Documentation ¶
Index ¶
- Constants
- Variables
- func NewKVStoreClient[T proto.Message](client KeyValueStoreClient) storage.KeyValueStoreT[T]
- func NewPlugin(client SystemPluginClient) plugin.Plugin
- func RegisterKeyValueStoreServer(s grpc.ServiceRegistrar, srv KeyValueStoreServer)
- func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
- type BrokerID
- type DialAddress
- type ExtensionClientInterface
- type Key
- type KeyList
- type KeyValue
- type KeyValueStoreClient
- type KeyValueStoreServer
- type SystemClient
- type SystemPluginClient
- type SystemPluginServer
- type SystemServer
- type UnimplementedKeyValueStoreServer
- func (UnimplementedKeyValueStoreServer) Delete(context.Context, *Key) (*emptypb.Empty, error)
- func (UnimplementedKeyValueStoreServer) Get(context.Context, *Key) (*Value, error)
- func (UnimplementedKeyValueStoreServer) ListKeys(context.Context, *Key) (*KeyList, error)
- func (UnimplementedKeyValueStoreServer) Put(context.Context, *KeyValue) (*emptypb.Empty, error)
- type UnimplementedSystemPluginClient
- func (UnimplementedSystemPluginClient) UseAPIExtensions(ExtensionClientInterface)
- func (UnimplementedSystemPluginClient) UseCachingProvider(caching.CachingProvider[proto.Message])
- func (UnimplementedSystemPluginClient) UseKeyValueStore(KeyValueStoreClient)
- func (UnimplementedSystemPluginClient) UseManagementAPI(managementv1.ManagementClient)
- func (UnimplementedSystemPluginClient) UseNodeManagerClient(capabilityv1.NodeManagerClient)
- type UnimplementedSystemServer
- func (UnimplementedSystemServer) UseAPIExtensions(context.Context, *DialAddress) (*emptypb.Empty, error)
- func (UnimplementedSystemServer) UseCachingProvider(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedSystemServer) UseKeyValueStore(context.Context, *BrokerID) (*emptypb.Empty, error)
- func (UnimplementedSystemServer) UseManagementAPI(context.Context, *BrokerID) (*emptypb.Empty, error)
- func (UnimplementedSystemServer) UseNodeManagerClient(context.Context, *BrokerID) (*emptypb.Empty, error)
- type UnsafeKeyValueStoreServer
- type UnsafeSystemServer
- type Value
Constants ¶
const ( SystemPluginID = "opni.System" KVServiceID = "system.KeyValueStore" SystemServiceID = "system.System" )
const ( System_UseManagementAPI_FullMethodName = "/system.System/UseManagementAPI" System_UseNodeManagerClient_FullMethodName = "/system.System/UseNodeManagerClient" System_UseKeyValueStore_FullMethodName = "/system.System/UseKeyValueStore" System_UseAPIExtensions_FullMethodName = "/system.System/UseAPIExtensions" System_UseCachingProvider_FullMethodName = "/system.System/UseCachingProvider" )
const ( KeyValueStore_Put_FullMethodName = "/system.KeyValueStore/Put" KeyValueStore_Get_FullMethodName = "/system.KeyValueStore/Get" KeyValueStore_Delete_FullMethodName = "/system.KeyValueStore/Delete" KeyValueStore_ListKeys_FullMethodName = "/system.KeyValueStore/ListKeys" )
Variables ¶
var File_github_com_rancher_opni_pkg_plugins_apis_system_system_proto protoreflect.FileDescriptor
var KeyValueStore_ServiceDesc = grpc.ServiceDesc{ ServiceName: "system.KeyValueStore", HandlerType: (*KeyValueStoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Put", Handler: _KeyValueStore_Put_Handler, }, { MethodName: "Get", Handler: _KeyValueStore_Get_Handler, }, { MethodName: "Delete", Handler: _KeyValueStore_Delete_Handler, }, { MethodName: "ListKeys", Handler: _KeyValueStore_ListKeys_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/pkg/plugins/apis/system/system.proto", }
KeyValueStore_ServiceDesc is the grpc.ServiceDesc for KeyValueStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var System_ServiceDesc = grpc.ServiceDesc{ ServiceName: "system.System", HandlerType: (*SystemServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UseManagementAPI", Handler: _System_UseManagementAPI_Handler, }, { MethodName: "UseNodeManagerClient", Handler: _System_UseNodeManagerClient_Handler, }, { MethodName: "UseKeyValueStore", Handler: _System_UseKeyValueStore_Handler, }, { MethodName: "UseAPIExtensions", Handler: _System_UseAPIExtensions_Handler, }, { MethodName: "UseCachingProvider", Handler: _System_UseCachingProvider_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/pkg/plugins/apis/system/system.proto", }
System_ServiceDesc is the grpc.ServiceDesc for System service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewKVStoreClient ¶ added in v0.5.4
func NewKVStoreClient[T proto.Message](client KeyValueStoreClient) storage.KeyValueStoreT[T]
func NewPlugin ¶
func NewPlugin(client SystemPluginClient) plugin.Plugin
func RegisterKeyValueStoreServer ¶
func RegisterKeyValueStoreServer(s grpc.ServiceRegistrar, srv KeyValueStoreServer)
func RegisterSystemServer ¶
func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
Types ¶
type BrokerID ¶
type BrokerID struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*BrokerID) Descriptor
deprecated
func (*BrokerID) ProtoMessage ¶
func (*BrokerID) ProtoMessage()
func (*BrokerID) ProtoReflect ¶
func (x *BrokerID) ProtoReflect() protoreflect.Message
type DialAddress ¶ added in v0.5.4
type DialAddress struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*DialAddress) Descriptor
deprecated
added in
v0.5.4
func (*DialAddress) Descriptor() ([]byte, []int)
Deprecated: Use DialAddress.ProtoReflect.Descriptor instead.
func (*DialAddress) GetValue ¶ added in v0.5.4
func (x *DialAddress) GetValue() string
func (*DialAddress) ProtoMessage ¶ added in v0.5.4
func (*DialAddress) ProtoMessage()
func (*DialAddress) ProtoReflect ¶ added in v0.5.4
func (x *DialAddress) ProtoReflect() protoreflect.Message
func (*DialAddress) Reset ¶ added in v0.5.4
func (x *DialAddress) Reset()
func (*DialAddress) String ¶ added in v0.5.4
func (x *DialAddress) String() string
type ExtensionClientInterface ¶ added in v0.5.4
type ExtensionClientInterface interface { // Attempt to obtain a ClientConn such that the API extensions with the given // names will be available on that client. If the requested extension is not // available, it will retry until it becomes available, or until the context // is canceled. GetClientConn(ctx context.Context, serviceNames ...string) (grpc.ClientConnInterface, error) }
ExtensionClientInterface allows plugins to obtain clients to API extensions implemented by other plugins.
type Key ¶
type Key struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*Key) Descriptor
deprecated
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type KeyList ¶
type KeyList struct { Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*KeyList) Descriptor
deprecated
func (*KeyList) ProtoMessage ¶
func (*KeyList) ProtoMessage()
func (*KeyList) ProtoReflect ¶
func (x *KeyList) ProtoReflect() protoreflect.Message
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KeyValue) Descriptor
deprecated
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) ProtoReflect ¶
func (x *KeyValue) ProtoReflect() protoreflect.Message
type KeyValueStoreClient ¶
type KeyValueStoreClient interface { Put(ctx context.Context, in *KeyValue, opts ...grpc.CallOption) (*emptypb.Empty, error) Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Value, error) Delete(ctx context.Context, in *Key, opts ...grpc.CallOption) (*emptypb.Empty, error) ListKeys(ctx context.Context, in *Key, opts ...grpc.CallOption) (*KeyList, error) }
KeyValueStoreClient is the client API for KeyValueStore 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.
func NewKeyValueStoreClient ¶
func NewKeyValueStoreClient(cc grpc.ClientConnInterface) KeyValueStoreClient
type KeyValueStoreServer ¶
type KeyValueStoreServer interface { Put(context.Context, *KeyValue) (*emptypb.Empty, error) Get(context.Context, *Key) (*Value, error) Delete(context.Context, *Key) (*emptypb.Empty, error) ListKeys(context.Context, *Key) (*KeyList, error) // contains filtered or unexported methods }
KeyValueStoreServer is the server API for KeyValueStore service. All implementations must embed UnimplementedKeyValueStoreServer for forward compatibility
type SystemClient ¶
type SystemClient interface { UseManagementAPI(ctx context.Context, in *BrokerID, opts ...grpc.CallOption) (*emptypb.Empty, error) UseNodeManagerClient(ctx context.Context, in *BrokerID, opts ...grpc.CallOption) (*emptypb.Empty, error) UseKeyValueStore(ctx context.Context, in *BrokerID, opts ...grpc.CallOption) (*emptypb.Empty, error) UseAPIExtensions(ctx context.Context, in *DialAddress, opts ...grpc.CallOption) (*emptypb.Empty, error) UseCachingProvider(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
SystemClient is the client API for System 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.
func NewSystemClient ¶
func NewSystemClient(cc grpc.ClientConnInterface) SystemClient
type SystemPluginClient ¶
type SystemPluginClient interface { UseManagementAPI(managementv1.ManagementClient) UseNodeManagerClient(capabilityv1.NodeManagerClient) UseCachingProvider(caching.CachingProvider[proto.Message]) UseKeyValueStore(KeyValueStoreClient) UseAPIExtensions(ExtensionClientInterface) // contains filtered or unexported methods }
type SystemPluginServer ¶
type SystemPluginServer interface { ServeManagementAPI(managementv1.ManagementServer) ServeNodeManagerServer(capabilityv1.NodeManagerServer) ServeKeyValueStore(storage.KeyValueStore) ServeAPIExtensions(dialAddress string) error ServeCachingProvider() }
type SystemServer ¶
type SystemServer interface { UseManagementAPI(context.Context, *BrokerID) (*emptypb.Empty, error) UseNodeManagerClient(context.Context, *BrokerID) (*emptypb.Empty, error) UseKeyValueStore(context.Context, *BrokerID) (*emptypb.Empty, error) UseAPIExtensions(context.Context, *DialAddress) (*emptypb.Empty, error) UseCachingProvider(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
SystemServer is the server API for System service. All implementations must embed UnimplementedSystemServer for forward compatibility
type UnimplementedKeyValueStoreServer ¶
type UnimplementedKeyValueStoreServer struct { }
UnimplementedKeyValueStoreServer must be embedded to have forward compatible implementations.
type UnimplementedSystemPluginClient ¶ added in v0.5.4
type UnimplementedSystemPluginClient struct{}
UnimplementedSystemPluginClient must be embedded to have forward compatible implementations.
func (UnimplementedSystemPluginClient) UseAPIExtensions ¶ added in v0.5.4
func (UnimplementedSystemPluginClient) UseAPIExtensions(ExtensionClientInterface)
func (UnimplementedSystemPluginClient) UseCachingProvider ¶ added in v0.9.2
func (UnimplementedSystemPluginClient) UseCachingProvider(caching.CachingProvider[proto.Message])
func (UnimplementedSystemPluginClient) UseKeyValueStore ¶ added in v0.5.4
func (UnimplementedSystemPluginClient) UseKeyValueStore(KeyValueStoreClient)
func (UnimplementedSystemPluginClient) UseManagementAPI ¶ added in v0.5.4
func (UnimplementedSystemPluginClient) UseManagementAPI(managementv1.ManagementClient)
func (UnimplementedSystemPluginClient) UseNodeManagerClient ¶ added in v0.6.0
func (UnimplementedSystemPluginClient) UseNodeManagerClient(capabilityv1.NodeManagerClient)
type UnimplementedSystemServer ¶
type UnimplementedSystemServer struct { }
UnimplementedSystemServer must be embedded to have forward compatible implementations.
func (UnimplementedSystemServer) UseAPIExtensions ¶ added in v0.5.4
func (UnimplementedSystemServer) UseAPIExtensions(context.Context, *DialAddress) (*emptypb.Empty, error)
func (UnimplementedSystemServer) UseCachingProvider ¶ added in v0.9.2
func (UnimplementedSystemServer) UseKeyValueStore ¶
func (UnimplementedSystemServer) UseManagementAPI ¶
func (UnimplementedSystemServer) UseNodeManagerClient ¶ added in v0.6.0
type UnsafeKeyValueStoreServer ¶
type UnsafeKeyValueStoreServer interface {
// contains filtered or unexported methods
}
UnsafeKeyValueStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KeyValueStoreServer will result in compilation errors.
type UnsafeSystemServer ¶
type UnsafeSystemServer interface {
// contains filtered or unexported methods
}
UnsafeSystemServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SystemServer will result in compilation errors.
type Value ¶
type Value struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Value) Descriptor
deprecated
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message