aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/interconnect_impl.h
blob: ee29e4d3971f4e64ec344aa93e01a9d65798503e (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
#pragma once

#include "interconnect.h"
#include <library/cpp/actors/protos/interconnect.pb.h>
#include <library/cpp/actors/core/event_pb.h>
#include <library/cpp/actors/helpers/mon_histogram_helper.h>
#include <library/cpp/monlib/dynamic_counters/counters.h>

namespace NActors {
    // resolve node info
    struct TEvInterconnect::TEvResolveNode: public TEventPB<TEvInterconnect::TEvResolveNode, NActorsInterconnect::TEvResolveNode, TEvInterconnect::EvResolveNode> {
        TEvResolveNode() {
        }

        TEvResolveNode(ui32 nodeId, TInstant deadline = TInstant::Max()) {
            Record.SetNodeId(nodeId);
            if (deadline != TInstant::Max()) {
                Record.SetDeadline(deadline.GetValue());
            }
        }
    };

    // node info
    struct TEvInterconnect::TEvNodeAddress: public TEventPB<TEvInterconnect::TEvNodeAddress, NActorsInterconnect::TEvNodeInfo, TEvInterconnect::EvNodeAddress> {
        TEvNodeAddress() {
        }

        TEvNodeAddress(ui32 nodeId) {
            Record.SetNodeId(nodeId);
        }
    };

    // register node
    struct TEvInterconnect::TEvRegisterNode: public TEventBase<TEvInterconnect::TEvRegisterNode, TEvInterconnect::EvRegisterNode> {
    };

    // reply on register node
    struct TEvInterconnect::TEvRegisterNodeResult: public TEventBase<TEvInterconnect::TEvRegisterNodeResult, TEvInterconnect::EvRegisterNodeResult> {
    };

    // disconnect
    struct TEvInterconnect::TEvDisconnect: public TEventLocal<TEvInterconnect::TEvDisconnect, TEvInterconnect::EvDisconnect> {
    };

}