Documentation ¶
Index ¶
- Variables
- func RegisterSyncerServer(s *grpc.Server, srv SyncerServer)
- type Action
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncRequest) GetAction() Action
- func (x *SyncRequest) GetValues() []string
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) String() string
- type SyncResponse
- type SyncerClient
- type SyncerServer
- type UnimplementedSyncerServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Action_name = map[int32]string{ 0: "Del", 1: "Expire", 2: "ExpireAt", 3: "Persist", 21: "Set", 22: "SetNX", 40: "HDel", 41: "HSet", 42: "HSetNx", 60: "LPush", 61: "LPop", 62: "LShift", 63: "LTrim", 64: "LBPop", } Action_value = map[string]int32{ "Del": 0, "Expire": 1, "ExpireAt": 2, "Persist": 3, "Set": 21, "SetNX": 22, "HDel": 40, "HSet": 41, "HSetNx": 42, "LPush": 60, "LPop": 61, "LShift": 62, "LTrim": 63, "LBPop": 64, } )
Enum value maps for Action.
View Source
var File_syncer_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSyncerServer ¶
func RegisterSyncerServer(s *grpc.Server, srv SyncerServer)
Types ¶
type Action ¶
type Action int32
const ( // Common Action_Del Action = 0 Action_Expire Action = 1 Action_ExpireAt Action = 2 Action_Persist Action = 3 // String Action_Set Action = 21 Action_SetNX Action = 22 // Hash Action_HDel Action = 40 Action_HSet Action = 41 Action_HSetNx Action = 42 // List Action_LPush Action = 60 Action_LPop Action = 61 Action_LShift Action = 62 Action_LTrim Action = 63 Action_LBPop Action = 64 )
func (Action) Descriptor ¶
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
func (Action) Number ¶
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶
func (Action) Type() protoreflect.EnumType
type SyncRequest ¶
type SyncRequest struct { Action Action `protobuf:"varint,1,opt,name=action,proto3,enum=jcache.driver.proto.Action" json:"action,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
RunRequest 执行请求参数
func (*SyncRequest) Descriptor
deprecated
func (*SyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
func (*SyncRequest) GetAction ¶
func (x *SyncRequest) GetAction() Action
func (*SyncRequest) GetValues ¶
func (x *SyncRequest) GetValues() []string
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶
func (x *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (x *SyncRequest) String() string
type SyncResponse ¶
type SyncResponse struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
RunResponse 执行返回参数
func (*SyncResponse) Descriptor
deprecated
func (*SyncResponse) Descriptor() ([]byte, []int)
Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.
func (*SyncResponse) GetValue ¶
func (x *SyncResponse) GetValue() []string
func (*SyncResponse) ProtoMessage ¶
func (*SyncResponse) ProtoMessage()
func (*SyncResponse) ProtoReflect ¶
func (x *SyncResponse) ProtoReflect() protoreflect.Message
func (*SyncResponse) Reset ¶
func (x *SyncResponse) Reset()
func (*SyncResponse) String ¶
func (x *SyncResponse) String() string
type SyncerClient ¶
type SyncerClient interface { Slave(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) Master(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) }
SyncerClient is the client API for Syncer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSyncerClient ¶
func NewSyncerClient(cc grpc.ClientConnInterface) SyncerClient
type SyncerServer ¶
type SyncerServer interface { Slave(context.Context, *SyncRequest) (*SyncResponse, error) Master(context.Context, *SyncRequest) (*SyncResponse, error) }
SyncerServer is the server API for Syncer service.
type UnimplementedSyncerServer ¶
type UnimplementedSyncerServer struct { }
UnimplementedSyncerServer can be embedded to have forward compatible implementations.
func (*UnimplementedSyncerServer) Master ¶
func (*UnimplementedSyncerServer) Master(context.Context, *SyncRequest) (*SyncResponse, error)
func (*UnimplementedSyncerServer) Slave ¶
func (*UnimplementedSyncerServer) Slave(context.Context, *SyncRequest) (*SyncResponse, error)
Click to show internal directories.
Click to hide internal directories.