Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CallRequest
- func (*CallRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallRequest) GetArgs() []byte
- func (x *CallRequest) GetKey() string
- func (x *CallRequest) GetProcedure() string
- func (x *CallRequest) GetTable() string
- func (*CallRequest) ProtoMessage()
- func (x *CallRequest) ProtoReflect() protoreflect.Message
- func (x *CallRequest) Reset()
- func (x *CallRequest) String() string
- type CallResponse
- type Empty
- type EvictAllRequest
- func (*EvictAllRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EvictAllRequest) GetKeys() []string
- func (x *EvictAllRequest) GetTable() string
- func (*EvictAllRequest) ProtoMessage()
- func (x *EvictAllRequest) ProtoReflect() protoreflect.Message
- func (x *EvictAllRequest) Reset()
- func (x *EvictAllRequest) String() string
- type EvictRequest
- func (*EvictRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EvictRequest) GetKey() string
- func (x *EvictRequest) GetTable() string
- func (*EvictRequest) ProtoMessage()
- func (x *EvictRequest) ProtoReflect() protoreflect.Message
- func (x *EvictRequest) Reset()
- func (x *EvictRequest) String() string
- type GetRequest
- type GetResponse
- type Item
- type PutRequest
- func (*PutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutRequest) GetItem() *Item
- func (x *PutRequest) GetKey() string
- func (x *PutRequest) GetTable() string
- func (*PutRequest) ProtoMessage()
- func (x *PutRequest) ProtoReflect() protoreflect.Message
- func (x *PutRequest) Reset()
- func (x *PutRequest) String() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Call(context.Context, *CallRequest) (*CallResponse, error)
- func (UnimplementedServiceServer) Evict(context.Context, *EvictRequest) (*Empty, error)
- func (UnimplementedServiceServer) EvictAll(context.Context, *EvictAllRequest) (*Empty, error)
- func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedServiceServer) HealthCheck(context.Context, *Empty) (*Empty, error)
- func (UnimplementedServiceServer) Put(context.Context, *PutRequest) (*Empty, error)
- type UnsafeServiceServer
Constants ¶
const ( Service_Get_FullMethodName = "/servicepb.Service/Get" Service_Put_FullMethodName = "/servicepb.Service/Put" Service_Evict_FullMethodName = "/servicepb.Service/Evict" Service_EvictAll_FullMethodName = "/servicepb.Service/EvictAll" Service_Call_FullMethodName = "/servicepb.Service/Call" Service_HealthCheck_FullMethodName = "/servicepb.Service/HealthCheck" )
Variables ¶
var File_servicepb_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "servicepb.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Service_Get_Handler, }, { MethodName: "Put", Handler: _Service_Put_Handler, }, { MethodName: "Evict", Handler: _Service_Evict_Handler, }, { MethodName: "EvictAll", Handler: _Service_EvictAll_Handler, }, { MethodName: "Call", Handler: _Service_Call_Handler, }, { MethodName: "HealthCheck", Handler: _Service_HealthCheck_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "servicepb/service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type CallRequest ¶ added in v0.4.0
type CallRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Procedure string `protobuf:"bytes,3,opt,name=procedure,proto3" json:"procedure,omitempty"` Args []byte `protobuf:"bytes,4,opt,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*CallRequest) Descriptor
deprecated
added in
v0.4.0
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetArgs ¶ added in v0.4.0
func (x *CallRequest) GetArgs() []byte
func (*CallRequest) GetKey ¶ added in v0.4.0
func (x *CallRequest) GetKey() string
func (*CallRequest) GetProcedure ¶ added in v0.4.0
func (x *CallRequest) GetProcedure() string
func (*CallRequest) GetTable ¶ added in v0.4.0
func (x *CallRequest) GetTable() string
func (*CallRequest) ProtoMessage ¶ added in v0.4.0
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶ added in v0.4.0
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶ added in v0.4.0
func (x *CallRequest) Reset()
func (*CallRequest) String ¶ added in v0.4.0
func (x *CallRequest) String() string
type CallResponse ¶ added in v0.4.0
type CallResponse struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*CallResponse) Descriptor
deprecated
added in
v0.4.0
func (*CallResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.
func (*CallResponse) GetItem ¶ added in v0.4.0
func (x *CallResponse) GetItem() *Item
func (*CallResponse) ProtoMessage ¶ added in v0.4.0
func (*CallResponse) ProtoMessage()
func (*CallResponse) ProtoReflect ¶ added in v0.4.0
func (x *CallResponse) ProtoReflect() protoreflect.Message
func (*CallResponse) Reset ¶ added in v0.4.0
func (x *CallResponse) Reset()
func (*CallResponse) String ¶ added in v0.4.0
func (x *CallResponse) String() string
type Empty ¶ added in v0.4.0
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
added in
v0.4.0
func (*Empty) ProtoMessage ¶ added in v0.4.0
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v0.4.0
func (x *Empty) ProtoReflect() protoreflect.Message
type EvictAllRequest ¶ added in v0.4.2
type EvictAllRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` // contains filtered or unexported fields }
func (*EvictAllRequest) Descriptor
deprecated
added in
v0.4.2
func (*EvictAllRequest) Descriptor() ([]byte, []int)
Deprecated: Use EvictAllRequest.ProtoReflect.Descriptor instead.
func (*EvictAllRequest) GetKeys ¶ added in v0.4.2
func (x *EvictAllRequest) GetKeys() []string
func (*EvictAllRequest) GetTable ¶ added in v0.4.2
func (x *EvictAllRequest) GetTable() string
func (*EvictAllRequest) ProtoMessage ¶ added in v0.4.2
func (*EvictAllRequest) ProtoMessage()
func (*EvictAllRequest) ProtoReflect ¶ added in v0.4.2
func (x *EvictAllRequest) ProtoReflect() protoreflect.Message
func (*EvictAllRequest) Reset ¶ added in v0.4.2
func (x *EvictAllRequest) Reset()
func (*EvictAllRequest) String ¶ added in v0.4.2
func (x *EvictAllRequest) String() string
type EvictRequest ¶
type EvictRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*EvictRequest) Descriptor
deprecated
func (*EvictRequest) Descriptor() ([]byte, []int)
Deprecated: Use EvictRequest.ProtoReflect.Descriptor instead.
func (*EvictRequest) GetKey ¶
func (x *EvictRequest) GetKey() string
func (*EvictRequest) GetTable ¶
func (x *EvictRequest) GetTable() string
func (*EvictRequest) ProtoMessage ¶
func (*EvictRequest) ProtoMessage()
func (*EvictRequest) ProtoReflect ¶
func (x *EvictRequest) ProtoReflect() protoreflect.Message
func (*EvictRequest) Reset ¶
func (x *EvictRequest) Reset()
func (*EvictRequest) String ¶
func (x *EvictRequest) String() string
type GetRequest ¶
type GetRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,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) GetTable ¶
func (x *GetRequest) GetTable() 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 { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` Hit bool `protobuf:"varint,2,opt,name=hit,proto3" json:"hit,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetHit ¶ added in v0.4.1
func (x *GetResponse) GetHit() bool
func (*GetResponse) GetItem ¶
func (x *GetResponse) GetItem() *Item
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 Item ¶
type Item struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Expire int64 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type PutRequest ¶
type PutRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Item *Item `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetItem ¶ added in v0.2.0
func (x *PutRequest) GetItem() *Item
func (*PutRequest) GetKey ¶ added in v0.4.1
func (x *PutRequest) GetKey() string
func (*PutRequest) GetTable ¶
func (x *PutRequest) GetTable() string
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) String ¶
func (x *PutRequest) String() string
type ServiceClient ¶
type ServiceClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error) Evict(ctx context.Context, in *EvictRequest, opts ...grpc.CallOption) (*Empty, error) EvictAll(ctx context.Context, in *EvictAllRequest, opts ...grpc.CallOption) (*Empty, error) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*Empty, error) Evict(context.Context, *EvictRequest) (*Empty, error) EvictAll(context.Context, *EvictAllRequest) (*Empty, error) Call(context.Context, *CallRequest) (*CallResponse, error) HealthCheck(context.Context, *Empty) (*Empty, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Call ¶ added in v0.4.0
func (UnimplementedServiceServer) Call(context.Context, *CallRequest) (*CallResponse, error)
func (UnimplementedServiceServer) Evict ¶
func (UnimplementedServiceServer) Evict(context.Context, *EvictRequest) (*Empty, error)
func (UnimplementedServiceServer) EvictAll ¶ added in v0.4.2
func (UnimplementedServiceServer) EvictAll(context.Context, *EvictAllRequest) (*Empty, error)
func (UnimplementedServiceServer) Get ¶
func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedServiceServer) HealthCheck ¶ added in v0.4.0
func (UnimplementedServiceServer) Put ¶
func (UnimplementedServiceServer) Put(context.Context, *PutRequest) (*Empty, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.