aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/ut/lib/test_events.h
blob: cd0d9e01520dbc8738f1e61e020e8a85fa249b5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include <library/cpp/actors/interconnect/ut/protos/interconnect_test.pb.h>

namespace NActors {
    enum {
        EvTest = EventSpaceBegin(TEvents::ES_PRIVATE),
        EvTestChan,
        EvTestSmall,
        EvTestLarge,
        EvTestResponse,
    };

    struct TEvTest : TEventPB<TEvTest, NInterconnectTest::TEvTest, EvTest> {
        TEvTest() = default;

        TEvTest(ui64 sequenceNumber, const TString& payload) {
            Record.SetSequenceNumber(sequenceNumber);
            Record.SetPayload(payload);
        }
    };

    struct TEvTestLarge : TEventPB<TEvTestLarge, NInterconnectTest::TEvTestLarge, EvTestLarge> {
        TEvTestLarge() = default;

        TEvTestLarge(ui64 sequenceNumber, const TString& payload) {
            Record.SetSequenceNumber(sequenceNumber);
            Record.SetPayload(payload);
        }
    };

    struct TEvTestSmall : TEventPB<TEvTestSmall, NInterconnectTest::TEvTestSmall, EvTestSmall> {
        TEvTestSmall() = default;

        TEvTestSmall(ui64 sequenceNumber, const TString& payload) {
            Record.SetSequenceNumber(sequenceNumber);
            Record.SetPayload(payload);
        }
    };

    struct TEvTestResponse : TEventPB<TEvTestResponse, NInterconnectTest::TEvTestResponse, EvTestResponse> {
        TEvTestResponse() = default;

        TEvTestResponse(ui64 confirmedSequenceNumber) {
            Record.SetConfirmedSequenceNumber(confirmedSequenceNumber);
        }
    };

}