v1

package
v0.34.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 9 Imported by: 38

Documentation

Index

Constants

View Source
const (
	Registration_GetInfo_FullMethodName                  = "/pluginregistration.Registration/GetInfo"
	Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus"
)
View Source
const (
	// CSIPlugin identifier for registered CSI plugins
	CSIPlugin = "CSIPlugin"
	// DevicePlugin identifier for registered device plugins
	DevicePlugin = "DevicePlugin"
	// DRAPlugin identifier for registered Dynamic Resourc Allocation plugins
	DRAPlugin = "DRAPlugin"
)

Variables

View Source
var File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto protoreflect.FileDescriptor
View Source
var Registration_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pluginregistration.Registration",
	HandlerType: (*RegistrationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _Registration_GetInfo_Handler,
		},
		{
			MethodName: "NotifyRegistrationStatus",
			Handler:    _Registration_NotifyRegistrationStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto",
}

Registration_ServiceDesc is the grpc.ServiceDesc for Registration service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRegistrationServer

func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer)

Types

type InfoRequest

type InfoRequest struct {
	// contains filtered or unexported fields
}

InfoRequest is the empty request message from Kubelet

func (*InfoRequest) Descriptor deprecated

func (*InfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect added in v0.34.0

func (x *InfoRequest) ProtoReflect() protoreflect.Message

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type PluginInfo

type PluginInfo struct {

	// Type of the Plugin. CSIPlugin or DevicePlugin
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Plugin name that uniquely identifies the plugin for the given plugin type.
	// For DevicePlugin, this is the resource name that the plugin manages and
	// should follow the extended resource name convention.
	// For CSI, this is the CSI driver registrar name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Optional endpoint location. If found set by Kubelet component,
	// Kubelet component will use this endpoint for specific requests.
	// This allows the plugin to register using one endpoint and possibly use
	// a different socket for control operations. CSI uses this model to delegate
	// its registration external from the plugin.
	Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Plugin service API versions the plugin supports.
	// For DevicePlugin, this maps to the deviceplugin API versions the
	// plugin supports at the given socket.
	// The Kubelet component communicating with the plugin should be able
	// to choose any preferred version from this list, or returns an error
	// if none of the listed versions is supported.
	SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"`
	// contains filtered or unexported fields
}

PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration

func (*PluginInfo) Descriptor deprecated

func (*PluginInfo) Descriptor() ([]byte, []int)

Deprecated: Use PluginInfo.ProtoReflect.Descriptor instead.

func (*PluginInfo) GetEndpoint

func (x *PluginInfo) GetEndpoint() string

func (*PluginInfo) GetName

func (x *PluginInfo) GetName() string

func (*PluginInfo) GetSupportedVersions

func (x *PluginInfo) GetSupportedVersions() []string

func (*PluginInfo) GetType

func (x *PluginInfo) GetType() string

func (*PluginInfo) ProtoMessage

func (*PluginInfo) ProtoMessage()

func (*PluginInfo) ProtoReflect added in v0.34.0

func (x *PluginInfo) ProtoReflect() protoreflect.Message

func (*PluginInfo) Reset

func (x *PluginInfo) Reset()

func (*PluginInfo) String

func (x *PluginInfo) String() string

type RegistrationClient

type RegistrationClient interface {
	GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error)
	NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error)
}

RegistrationClient is the client API for Registration service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Registration is the service advertised by the Plugins.

type RegistrationServer

type RegistrationServer interface {
	GetInfo(context.Context, *InfoRequest) (*PluginInfo, error)
	NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error)
	// contains filtered or unexported methods
}

RegistrationServer is the server API for Registration service. All implementations must embed UnimplementedRegistrationServer for forward compatibility.

Registration is the service advertised by the Plugins.

type RegistrationStatus

type RegistrationStatus struct {

	// True if plugin gets registered successfully at Kubelet
	PluginRegistered bool `protobuf:"varint,1,opt,name=plugin_registered,json=pluginRegistered,proto3" json:"plugin_registered,omitempty"`
	// Error message in case plugin fails to register, empty string otherwise
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status

func (*RegistrationStatus) Descriptor deprecated

func (*RegistrationStatus) Descriptor() ([]byte, []int)

Deprecated: Use RegistrationStatus.ProtoReflect.Descriptor instead.

func (*RegistrationStatus) GetError

func (x *RegistrationStatus) GetError() string

func (*RegistrationStatus) GetPluginRegistered

func (x *RegistrationStatus) GetPluginRegistered() bool

func (*RegistrationStatus) ProtoMessage

func (*RegistrationStatus) ProtoMessage()

func (*RegistrationStatus) ProtoReflect added in v0.34.0

func (x *RegistrationStatus) ProtoReflect() protoreflect.Message

func (*RegistrationStatus) Reset

func (x *RegistrationStatus) Reset()

func (*RegistrationStatus) String

func (x *RegistrationStatus) String() string

type RegistrationStatusResponse

type RegistrationStatusResponse struct {
	// contains filtered or unexported fields
}

RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC

func (*RegistrationStatusResponse) Descriptor deprecated

func (*RegistrationStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegistrationStatusResponse.ProtoReflect.Descriptor instead.

func (*RegistrationStatusResponse) ProtoMessage

func (*RegistrationStatusResponse) ProtoMessage()

func (*RegistrationStatusResponse) ProtoReflect added in v0.34.0

func (*RegistrationStatusResponse) Reset

func (x *RegistrationStatusResponse) Reset()

func (*RegistrationStatusResponse) String

func (x *RegistrationStatusResponse) String() string

type UnimplementedRegistrationServer added in v0.27.0

type UnimplementedRegistrationServer struct{}

UnimplementedRegistrationServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedRegistrationServer) GetInfo added in v0.27.0

func (UnimplementedRegistrationServer) NotifyRegistrationStatus added in v0.27.0

type UnsafeRegistrationServer added in v0.34.0

type UnsafeRegistrationServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistrationServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL