kvstore

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_kvstore_kvstore_proto protoreflect.FileDescriptor
View Source
var KVStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kvstore.KVStore",
	HandlerType: (*KVStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StoreVal",
			Handler:    _KVStore_StoreVal_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kvstore/kvstore.proto",
}

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

Functions

func NewGrpcStorage added in v0.0.13

func NewGrpcStorage(addresses []string, serverPort int, logger *logging.LoggerUtil) (kvstore.Storage, error)

NewGrpcStorage creates a new distributed kvstore.Storage.

func RegisterKVStoreServer added in v0.0.13

func RegisterKVStoreServer(s grpc.ServiceRegistrar, srv KVStoreServer)

Types

type KVStoreClient added in v0.0.13

type KVStoreClient interface {
	StoreVal(ctx context.Context, in *StoreValRequest, opts ...grpc.CallOption) (*StoreValResponse, error)
}

KVStoreClient is the client API for KVStore 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 NewKVStoreClient added in v0.0.13

func NewKVStoreClient(cc grpc.ClientConnInterface) KVStoreClient

type KVStoreServer added in v0.0.13

type KVStoreServer interface {
	StoreVal(context.Context, *StoreValRequest) (*StoreValResponse, error)
	// contains filtered or unexported methods
}

KVStoreServer is the server API for KVStore service. All implementations must embed UnimplementedKVStoreServer for forward compatibility

type StoreValRequest added in v0.0.13

type StoreValRequest struct {
	Storage string `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
	Key     string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value   string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreValRequest) Descriptor deprecated added in v0.0.13

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

Deprecated: Use StoreValRequest.ProtoReflect.Descriptor instead.

func (*StoreValRequest) GetKey added in v0.0.13

func (x *StoreValRequest) GetKey() string

func (*StoreValRequest) GetStorage added in v1.2.3

func (x *StoreValRequest) GetStorage() string

func (*StoreValRequest) GetValue added in v0.0.13

func (x *StoreValRequest) GetValue() string

func (*StoreValRequest) ProtoMessage added in v0.0.13

func (*StoreValRequest) ProtoMessage()

func (*StoreValRequest) ProtoReflect added in v0.0.13

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

func (*StoreValRequest) Reset added in v0.0.13

func (x *StoreValRequest) Reset()

func (*StoreValRequest) String added in v0.0.13

func (x *StoreValRequest) String() string

type StoreValResponse added in v0.0.13

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

func (*StoreValResponse) Descriptor deprecated added in v0.0.13

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

Deprecated: Use StoreValResponse.ProtoReflect.Descriptor instead.

func (*StoreValResponse) ProtoMessage added in v0.0.13

func (*StoreValResponse) ProtoMessage()

func (*StoreValResponse) ProtoReflect added in v0.0.13

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

func (*StoreValResponse) Reset added in v0.0.13

func (x *StoreValResponse) Reset()

func (*StoreValResponse) String added in v0.0.13

func (x *StoreValResponse) String() string

type UnimplementedKVStoreServer added in v0.0.13

type UnimplementedKVStoreServer struct {
}

UnimplementedKVStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedKVStoreServer) StoreVal added in v0.0.13

type UnsafeKVStoreServer added in v0.0.13

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

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

Jump to

Keyboard shortcuts

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