Documentation ¶
Index ¶
- Constants
- Variables
- func NewPlugin(client SystemPluginClient) plugin.Plugin
- func RegisterKeyValueStoreServer(s grpc.ServiceRegistrar, srv KeyValueStoreServer)
- func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
- type BrokerID
- type KVStoreClient
- type Key
- type KeyList
- type KeyValue
- type KeyValueStoreClient
- type KeyValueStoreServer
- type SystemClient
- type SystemPluginClient
- type SystemPluginServer
- type SystemServer
- type UnimplementedKeyValueStoreServer
- type UnimplementedSystemServer
- type UnsafeKeyValueStoreServer
- type UnsafeSystemServer
- type Value
Constants ¶
const ( SystemPluginID = "opni.System" KVServiceID = "system.KeyValueStore" SystemServiceID = "system.System" )
Variables ¶
var File_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: "ListKeys", Handler: _KeyValueStore_ListKeys_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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: "UseKeyValueStore", Handler: _System_UseKeyValueStore_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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 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 KVStoreClient ¶
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) 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) 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) UseKeyValueStore(ctx context.Context, in *BrokerID, 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) UseKeyValueStore(KVStoreClient) }
type SystemPluginServer ¶
type SystemPluginServer interface { ServeManagementAPI(managementv1.ManagementServer) ServeKeyValueStore(storage.KeyValueStore) }
type SystemServer ¶
type SystemServer interface { UseManagementAPI(context.Context, *BrokerID) (*emptypb.Empty, error) UseKeyValueStore(context.Context, *BrokerID) (*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 UnimplementedSystemServer ¶
type UnimplementedSystemServer struct { }
UnimplementedSystemServer must be embedded to have forward compatible implementations.
func (UnimplementedSystemServer) UseKeyValueStore ¶
func (UnimplementedSystemServer) UseManagementAPI ¶
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