system

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SystemPluginID  = "opni.System"
	KVServiceID     = "system.KeyValueStore"
	SystemServiceID = "system.System"
)

Variables

View Source
var File_pkg_plugins_apis_system_system_proto protoreflect.FileDescriptor
View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use BrokerID.ProtoReflect.Descriptor instead.

func (*BrokerID) GetId

func (x *BrokerID) GetId() uint32

func (*BrokerID) ProtoMessage

func (*BrokerID) ProtoMessage()

func (*BrokerID) ProtoReflect

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

func (*BrokerID) Reset

func (x *BrokerID) Reset()

func (*BrokerID) String

func (x *BrokerID) String() string

type KVStoreClient

type KVStoreClient interface {
	Put(key string, value proto.Message) error
	Get(key string, out proto.Message) error
	ListKeys(prefix string) ([]string, error)
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetKey

func (x *Key) GetKey() string

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use KeyList.ProtoReflect.Descriptor instead.

func (*KeyList) GetItems

func (x *KeyList) GetItems() []string

func (*KeyList) ProtoMessage

func (*KeyList) ProtoMessage()

func (*KeyList) ProtoReflect

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

func (*KeyList) Reset

func (x *KeyList) Reset()

func (*KeyList) String

func (x *KeyList) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.

func (*KeyValue) GetKey

func (x *KeyValue) GetKey() string

func (*KeyValue) GetValue

func (x *KeyValue) GetValue() []byte

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) ProtoReflect

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

func (*KeyValue) Reset

func (x *KeyValue) Reset()

func (*KeyValue) String

func (x *KeyValue) String() string

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.

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(management.ManagementClient)
	UseKeyValueStore(KVStoreClient)
}

type SystemPluginServer

type SystemPluginServer interface {
	ServeManagementAPI(management.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.

func (UnimplementedKeyValueStoreServer) Get

func (UnimplementedKeyValueStoreServer) ListKeys

func (UnimplementedKeyValueStoreServer) Put

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) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetValue

func (x *Value) GetValue() []byte

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

Jump to

Keyboard shortcuts

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