Skip to content

Update the client protocol to new defined contract#2

Merged
blakerouse merged 2 commits intoelastic:masterfrom
blakerouse:grpc-client-proto
May 19, 2020
Merged

Update the client protocol to new defined contract#2
blakerouse merged 2 commits intoelastic:masterfrom
blakerouse:grpc-client-proto

Conversation

@blakerouse
Copy link
Copy Markdown
Contributor

Updates the client protocol to reverse the connection adding the Checkin and Actions bi-directional streams.

// Expects that the application is running.
RUNNING = 0;
// Expects that the application is stopping.
STOPPING = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we expecting it to be stopping or stopped, just a small detail

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once stopped the application should be off and the GRPC should be disconnected at that point. So I was going with stopping which also goes with running both being -ing based.

// 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
// with be empty.)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/with/will probably

}

message StatusRequest{
// A action request is streamed from the Elastic Agent to the application so an action can be performed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor s/A action/An action

message ActionRequest {
// Token that is used to unique identify the application to agent. When agent started this
// application it would have provided it this token.
string token = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need unique token when sending req from agent to application? it should be probably moved to ActionResponse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct it would be more appropriate on ActionResponse but being that Agent shouldn't even send a ActionRequest until the application has checked in with the correct unique token, then really this can be removed all together (I removed it).

Copy link
Copy Markdown
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blakerouse blakerouse merged commit 2663af8 into elastic:master May 19, 2020
@blakerouse blakerouse deleted the grpc-client-proto branch May 19, 2020 12:07
@blakerouse blakerouse mentioned this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants