Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)
- type CacheServiceClient
- type CacheServiceServer
- type GetRequest
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetValue() string
- func (x *GetResponse) GetVersion() uint32
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- type SetRequest
- func (*SetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetRequest) GetKey() string
- func (x *SetRequest) GetSourceNode() string
- func (x *SetRequest) GetValue() string
- func (*SetRequest) ProtoMessage()
- func (x *SetRequest) ProtoReflect() protoreflect.Message
- func (x *SetRequest) Reset()
- func (x *SetRequest) String() string
- type UnimplementedCacheServiceServer
- type UnsafeCacheServiceServer
Constants ¶
const ( CacheService_Set_FullMethodName = "/v1.cache.CacheService/Set" CacheService_Get_FullMethodName = "/v1.cache.CacheService/Get" )
Variables ¶
var CacheService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.cache.CacheService", HandlerType: (*CacheServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Set", Handler: _CacheService_Set_Handler, }, { MethodName: "Get", Handler: _CacheService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cache.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)
var File_cache_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacheServiceServer ¶
func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)
Types ¶
type CacheServiceClient ¶
type CacheServiceClient interface {
Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*empty.Empty, error)
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, 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.
func NewCacheServiceClient ¶
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient
type CacheServiceServer ¶
type CacheServiceServer interface {
Set(context.Context, *SetRequest) (*empty.Empty, error)
Get(context.Context, *GetRequest) (*GetResponse, error)
// contains filtered or unexported methods
}
CacheServiceServer is the server API for CacheService service. All implementations must embed UnimplementedCacheServiceServer for forward compatibility.
type GetRequest ¶
type GetRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
SourceNode string `protobuf:"bytes,2,opt,name=source_node,json=sourceNode,proto3" json:"source_node,omitempty"`
// contains filtered or unexported fields
}
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() string
func (*GetRequest) GetSourceNode ¶
func (x *GetRequest) GetSourceNode() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetValue ¶
func (x *GetResponse) GetValue() string
func (*GetResponse) GetVersion ¶
func (x *GetResponse) GetVersion() uint32
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type SetRequest ¶
type SetRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
SourceNode string `protobuf:"bytes,3,opt,name=source_node,json=sourceNode,proto3" json:"source_node,omitempty"`
// contains filtered or unexported fields
}
func (*SetRequest) Descriptor
deprecated
func (*SetRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.
func (*SetRequest) GetKey ¶
func (x *SetRequest) GetKey() string
func (*SetRequest) GetSourceNode ¶
func (x *SetRequest) GetSourceNode() string
func (*SetRequest) GetValue ¶
func (x *SetRequest) GetValue() string
func (*SetRequest) ProtoMessage ¶
func (*SetRequest) ProtoMessage()
func (*SetRequest) ProtoReflect ¶
func (x *SetRequest) ProtoReflect() protoreflect.Message
func (*SetRequest) Reset ¶
func (x *SetRequest) Reset()
func (*SetRequest) String ¶
func (x *SetRequest) String() string
type UnimplementedCacheServiceServer ¶
type UnimplementedCacheServiceServer struct{}
UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCacheServiceServer) Get ¶
func (UnimplementedCacheServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedCacheServiceServer) Set ¶
func (UnimplementedCacheServiceServer) Set(context.Context, *SetRequest) (*empty.Empty, error)
type UnsafeCacheServiceServer ¶
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.