aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/ut/lib/test_events.h
blob: 1bb5eb7d383a164291389329a564de80dc9cc74e (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
50
51
52
53
54
#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,
        EvTestStartPolling,
    };

    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);
        }
    };

    struct TEvTestStartPolling : TEventPB<TEvTestStartPolling, NInterconnectTest::TEvTestStartPolling, EvTestStartPolling> {
        TEvTestStartPolling() = default;
    };

}