kv_storage

package
v0.15.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KVStorage_Get_FullMethodName    = "/kv_storage.KVStorage/Get"
	KVStorage_Put_FullMethodName    = "/kv_storage.KVStorage/Put"
	KVStorage_Delete_FullMethodName = "/kv_storage.KVStorage/Delete"
)

Variables

View Source
var File_kv_storage_kv_storage_proto protoreflect.FileDescriptor
View Source
var KVStorage_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kv_storage.KVStorage",
	HandlerType: (*KVStorageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Delete",
			Handler:    _KVStorage_Delete_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Get",
			Handler:       _KVStorage_Get_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Put",
			Handler:       _KVStorage_Put_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "kv_storage/kv_storage.proto",
}

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

Functions

func RegisterKVStorageServer

func RegisterKVStorageServer(s grpc.ServiceRegistrar, srv KVStorageServer)

Types

type DeleteResponse

type DeleteResponse struct {
	Ok uint32 `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetOk

func (x *DeleteResponse) GetOk() uint32

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type KVStorageClient

type KVStorageClient interface {
	Get(ctx context.Context, in *bytestream.ReadRequest, opts ...grpc.CallOption) (KVStorage_GetClient, error)
	Put(ctx context.Context, opts ...grpc.CallOption) (KVStorage_PutClient, error)
	Delete(ctx context.Context, in *bytestream.ReadRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

KVStorageClient is the client API for KVStorage 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 NewKVStorageClient

func NewKVStorageClient(cc grpc.ClientConnInterface) KVStorageClient

type KVStorageServer

type KVStorageServer interface {
	Get(*bytestream.ReadRequest, KVStorage_GetServer) error
	Put(KVStorage_PutServer) error
	Delete(context.Context, *bytestream.ReadRequest) (*DeleteResponse, error)
	// contains filtered or unexported methods
}

KVStorageServer is the server API for KVStorage service. All implementations must embed UnimplementedKVStorageServer for forward compatibility

type KVStorage_GetClient

type KVStorage_GetClient interface {
	Recv() (*bytestream.ReadResponse, error)
	grpc.ClientStream
}

type KVStorage_GetServer

type KVStorage_GetServer interface {
	Send(*bytestream.ReadResponse) error
	grpc.ServerStream
}

type KVStorage_PutClient

type KVStorage_PutClient interface {
	Send(*bytestream.WriteRequest) error
	CloseAndRecv() (*bytestream.WriteResponse, error)
	grpc.ClientStream
}

type KVStorage_PutServer

type KVStorage_PutServer interface {
	SendAndClose(*bytestream.WriteResponse) error
	Recv() (*bytestream.WriteRequest, error)
	grpc.ServerStream
}

type UnimplementedKVStorageServer

type UnimplementedKVStorageServer struct {
}

UnimplementedKVStorageServer must be embedded to have forward compatible implementations.

func (UnimplementedKVStorageServer) Delete

func (UnimplementedKVStorageServer) Get

func (UnimplementedKVStorageServer) Put

type UnsafeKVStorageServer

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

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

Jump to

Keyboard shortcuts

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