-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathelastic-agent-client-deprecated.proto
64 lines (59 loc) · 2.44 KB
/
elastic-agent-client-deprecated.proto
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
62
63
64
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
// This file preserves the messages used with the deprecated elastic agent Checkin() RPC for reference.
syntax = "proto3";
package proto;
option cc_enable_arenas = true;
option go_package = "pkg/proto;proto";
// A status observed message is streamed from the application to Elastic Agent.
//
// This message contains the currently applied `config_state_idx` (0 in the case of initial start, 1 is the first
// applied config index) along with the status of the application. In the case that the sent `config_state_idx`
// doesn't match the expected `config_state_idx` that Elastic Agent expects, the application is always marked as
// `CONFIGURING`.
message StateObserved {
// Status codes for the current state.
enum Status {
// Application is starting.
STARTING = 0;
// Application is currently configuring.
CONFIGURING = 1;
// Application is in healthy state.
HEALTHY = 2;
// Application is working but in a degraded state.
DEGRADED = 3;
// Application is failing completely.
FAILED = 4;
// Application is stopping.
STOPPING = 5;
}
// Token that is used to uniquely identify the application to agent. When agent started this
// application it would have provided it this token.
string token = 1;
// Current index of the applied configuration.
uint64 config_state_idx = 2;
// Status code.
Status status = 3;
// Message for the health status.
string message = 4;
// JSON encoded payload for the status.
string payload = 5;
}
// A state expected message is streamed from the Elastic Agent to the application informing the application
// what Elastic Agent expects the applications state to be.
message StateExpected {
enum State {
// Expects that the application is running.
RUNNING = 0;
// Expects that the application is stopping.
STOPPING = 1;
}
// Expected state of the application.
State state = 1;
// Index of the either current configuration or new configuration provided.
uint64 config_state_idx = 2;
// Resulting configuration. (If the application already has the current `config_state_idx` this
// will be empty.)
string config = 3;
}