github.com/google/cadvisor@v0.49.1/third_party/containerd/api/services/introspection/v1/introspection.proto (about)

     1  /*
     2  	Copyright The containerd Authors.
     3  
     4  	Licensed under the Apache License, Version 2.0 (the "License");
     5  	you may not use this file except in compliance with the License.
     6  	You may obtain a copy of the License at
     7  
     8  		http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  	Unless required by applicable law or agreed to in writing, software
    11  	distributed under the License is distributed on an "AS IS" BASIS,
    12  	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  	See the License for the specific language governing permissions and
    14  	limitations under the License.
    15  */
    16  
    17  syntax = "proto3";
    18  
    19  package containerd.services.introspection.v1;
    20  
    21  import "github.com/containerd/containerd/api/types/platform.proto";
    22  import "google/rpc/status.proto";
    23  import "google/protobuf/empty.proto";
    24  import weak "gogoproto/gogo.proto";
    25  
    26  option go_package = "github.com/containerd/containerd/api/services/introspection/v1;introspection";
    27  
    28  service Introspection {
    29  	// Plugins returns a list of plugins in containerd.
    30  	//
    31  	// Clients can use this to detect features and capabilities when using
    32  	// containerd.
    33  	rpc Plugins(PluginsRequest) returns (PluginsResponse);
    34  	// Server returns information about the containerd server
    35  	rpc Server(google.protobuf.Empty) returns (ServerResponse);
    36  }
    37  
    38  message Plugin {
    39  	// Type defines the type of plugin.
    40  	//
    41  	// See package plugin for a list of possible values. Non core plugins may
    42  	// define their own values during registration.
    43  	string type = 1;
    44  
    45  	// ID identifies the plugin uniquely in the system.
    46  	string id = 2;
    47  
    48  	// Requires lists the plugin types required by this plugin.
    49  	repeated string requires = 3;
    50  
    51  	// Platforms enumerates the platforms this plugin will support.
    52  	//
    53  	// If values are provided here, the plugin will only be operable under the
    54  	// provided platforms.
    55  	//
    56  	// If this is empty, the plugin will work across all platforms.
    57  	//
    58  	// If the plugin prefers certain platforms over others, they should be
    59  	// listed from most to least preferred.
    60  	repeated types.Platform platforms = 4 [(gogoproto.nullable) = false];
    61  
    62  	// Exports allows plugins to provide values about state or configuration to
    63  	// interested parties.
    64  	//
    65  	// One example is exposing the configured path of a snapshotter plugin.
    66  	map<string, string> exports = 5;
    67  
    68  	// Capabilities allows plugins to communicate feature switches to allow
    69  	// clients to detect features that may not be on be default or may be
    70  	// different from version to version.
    71  	//
    72  	// Use this sparingly.
    73  	repeated string capabilities = 6;
    74  
    75  	// InitErr will be set if the plugin fails initialization.
    76  	//
    77  	// This means the plugin may have been registered but a non-terminal error
    78  	// was encountered during initialization.
    79  	//
    80  	// Plugins that have this value set cannot be used.
    81  	google.rpc.Status init_err = 7;
    82  }
    83  
    84  message PluginsRequest {
    85  	// Filters contains one or more filters using the syntax defined in the
    86  	// containerd filter package.
    87  	//
    88  	// The returned result will be those that match any of the provided
    89  	// filters. Expanded, plugins that match the following will be
    90  	// returned:
    91  	//
    92  	//   filters[0] or filters[1] or ... or filters[n-1] or filters[n]
    93  	//
    94  	// If filters is zero-length or nil, all items will be returned.
    95  	repeated string filters = 1;
    96  }
    97  
    98  message PluginsResponse {
    99  	repeated Plugin plugins = 1 [(gogoproto.nullable) = false];
   100  }
   101  
   102  message ServerResponse {
   103  	string uuid = 1 [(gogoproto.customname) = "UUID"];
   104  }