resource.proto 957 B

12345678910111213141516171819202122232425262728293031323334
  1. syntax = "proto3";
  2. package docker.swarmkit.v1;
  3. import "types.proto";
  4. import "gogoproto/gogo.proto";
  5. import "plugin/plugin.proto";
  6. // Allocator is the API provided by a manager group for agents to control the allocation of certain entities.
  7. //
  8. // API methods on this service are used only by agent nodes.
  9. service ResourceAllocator {
  10. rpc AttachNetwork(AttachNetworkRequest) returns (AttachNetworkResponse) {
  11. option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-worker" roles: "swarm-manager" };
  12. };
  13. rpc DetachNetwork(DetachNetworkRequest) returns (DetachNetworkResponse) {
  14. option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-worker" roles: "swarm-manager" };
  15. };
  16. }
  17. message AttachNetworkRequest {
  18. NetworkAttachmentConfig config = 1;
  19. string container_id = 2;
  20. }
  21. message AttachNetworkResponse {
  22. string attachment_id = 1;
  23. }
  24. message DetachNetworkRequest {
  25. string attachment_id = 1;
  26. }
  27. message DetachNetworkResponse {}