-
Notifications
You must be signed in to change notification settings - Fork 18
/
tarsregistry.tars
executable file
·61 lines (54 loc) · 1.66 KB
/
tarsregistry.tars
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
55
56
57
58
59
60
61
module tars
{
struct AdapterConf{
0 require string servant;
1 require string endpoint;
2 optional string protocol;
3 optional int maxConns;
4 optional int threadNum;
5 optional int queueCap;
6 optional int queueTimeout;
};
struct onStartupReq{
0 require string nodeName;
1 require string application;
2 require string server;
3 optional string setID;
4 optional vector<AdapterConf> adapters;
5 optional bool disableFlow;
6 optional string State = "active";
7 optional string Version;
};
struct onPrestopReq{
0 require string nodeName;
1 optional string application;
2 optional string server;
};
struct keepAliveReq{
0 require string nodeName;
1 require string state; // inactive or active
2 optional string application;
3 optional string server;
};
struct RegisterMetricsReq{
0 require string nodeName;
1 require string application;
2 require string server;
3 require int metricsPort;
};
struct GetMetricsAdaptersReq{
0 optional map<string, string> filter; // enable in feature
};
struct MetricsAdapterInfo{
0 optional vector<string> targets;
1 optional map<string, string> labels;
};
interface tarsregistry
{
void onStartup(onStartupReq req);
void onPrestop(onPrestopReq req);
void keepAlive(keepAliveReq req);
void registerMetrics(RegisterMetricsReq req);
void getMetricsAdapters(GetMetricsAdaptersReq req, out vector<MetricsAdapterInfo> rsp);
};
};