github.com/kaisenlinux/docker@v0.0.0-20230510090727-ea55db55fac7/swarmkit/api/resource.proto (about)

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