cache

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cache.CacheService",
	HandlerType: (*CacheServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _CacheService_Get_Handler,
		},
		{
			MethodName: "Put",
			Handler:    _CacheService_Put_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cache/cache_service.proto",
}

CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService 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 File_cache_cache_proto protoreflect.FileDescriptor
View Source
var File_cache_cache_service_proto protoreflect.FileDescriptor

Functions

func RegisterCacheServiceServer

func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)

Types

type CacheServiceClient

type CacheServiceClient interface {
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
	Put(ctx context.Context, in *PutReq, opts ...grpc.CallOption) (*PutResp, error)
}

CacheServiceClient is the client API for CacheService 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 CacheServiceServer

type CacheServiceServer interface {
	Get(context.Context, *GetReq) (*GetResp, error)
	Put(context.Context, *PutReq) (*PutResp, error)
	// contains filtered or unexported methods
}

CacheServiceServer is the server API for CacheService service. All implementations must embed UnimplementedCacheServiceServer for forward compatibility

type GetReq

type GetReq struct {
	Key  string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Fast bool   `protobuf:"varint,2,opt,name=fast,proto3" json:"fast,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReq) Descriptor deprecated

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

Deprecated: Use GetReq.ProtoReflect.Descriptor instead.

func (*GetReq) GetFast

func (x *GetReq) GetFast() bool

func (*GetReq) GetKey

func (x *GetReq) GetKey() string

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) ProtoReflect added in v0.0.12

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

func (*GetReq) Reset

func (x *GetReq) Reset()

func (*GetReq) String

func (x *GetReq) String() string

type GetResp

type GetResp struct {
	Kv       *KV  `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"`
	InMemory bool `protobuf:"varint,2,opt,name=in_memory,json=inMemory,proto3" json:"in_memory,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResp) Descriptor deprecated

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

Deprecated: Use GetResp.ProtoReflect.Descriptor instead.

func (*GetResp) GetInMemory

func (x *GetResp) GetInMemory() bool

func (*GetResp) GetKv

func (x *GetResp) GetKv() *KV

func (*GetResp) ProtoMessage

func (*GetResp) ProtoMessage()

func (*GetResp) ProtoReflect added in v0.0.12

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

func (*GetResp) Reset

func (x *GetResp) Reset()

func (*GetResp) String

func (x *GetResp) String() string

type KV

type KV 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 (*KV) Descriptor deprecated

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

Deprecated: Use KV.ProtoReflect.Descriptor instead.

func (*KV) GetKey

func (x *KV) GetKey() string

func (*KV) GetValue

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

func (*KV) ProtoMessage

func (*KV) ProtoMessage()

func (*KV) ProtoReflect added in v0.0.12

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

func (*KV) Reset

func (x *KV) Reset()

func (*KV) String

func (x *KV) String() string

type PutReq

type PutReq struct {
	Kv        *KV  `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"`
	WriteBack bool `protobuf:"varint,2,opt,name=write_back,json=writeBack,proto3" json:"write_back,omitempty"`
	// contains filtered or unexported fields
}

func (*PutReq) Descriptor deprecated

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

Deprecated: Use PutReq.ProtoReflect.Descriptor instead.

func (*PutReq) GetKv

func (x *PutReq) GetKv() *KV

func (*PutReq) GetWriteBack

func (x *PutReq) GetWriteBack() bool

func (*PutReq) ProtoMessage

func (*PutReq) ProtoMessage()

func (*PutReq) ProtoReflect added in v0.0.12

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

func (*PutReq) Reset

func (x *PutReq) Reset()

func (*PutReq) String

func (x *PutReq) String() string

type PutResp

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

func (*PutResp) Descriptor deprecated

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

Deprecated: Use PutResp.ProtoReflect.Descriptor instead.

func (*PutResp) ProtoMessage

func (*PutResp) ProtoMessage()

func (*PutResp) ProtoReflect added in v0.0.12

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

func (*PutResp) Reset

func (x *PutResp) Reset()

func (*PutResp) String

func (x *PutResp) String() string

type UnimplementedCacheServiceServer added in v0.0.5

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCacheServiceServer) Get added in v0.0.5

func (UnimplementedCacheServiceServer) Put added in v0.0.5

type UnsafeCacheServiceServer added in v0.0.18

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

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

Jump to

Keyboard shortcuts

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