Initial worker porting steps (#232)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-12 00:40:39 -04:00
1 parent 73a38b1433
commit 203e2b5dc2
41 files changed
+2462 -645

No files matched your search

@@ -0,0 +1,33 @@
syntax = "proto3";
package controller.api.services.v1;
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
import "controller/servers/v1/servers.proto";
service WorkerService {
rpc Status(StatusRequest) returns (StatusResponse) {}
}
message StatusRequest {
// The worker info. We could use information from the TLS connection but this
// is easier and going the other route doesn't provide much benefit -- if you
// get access to the key and spoof the connection, you're already compromised.
servers.v1.Server worker = 10;
// Jobs currently active on this worker.
repeated string active_job_ids = 20;
}
message StatusResponse {
// Active controllers. This can be used (eventually) for conneciton
// management.
repeated servers.v1.Server controllers = 10;
// Jobs that should be canceled: ones assigned to this worker that have been
// reported as active but are in canceling state in the database. Once the
// worker cancels the job, it will no longer show up in active_jobs in the
// next heartbeat, and we can move the job to canceled state.
repeated string cancel_job_ids = 20;
}