Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCommonWorkerServer(s grpc.ServiceRegistrar, srv CommonWorkerServer)
- type CommonRequest
- func (*CommonRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommonRequest) GetD() *anypb.Any
- func (x *CommonRequest) GetE() []byte
- func (x *CommonRequest) GetN() []byte
- func (x *CommonRequest) GetP() int64
- func (x *CommonRequest) GetR() string
- func (x *CommonRequest) GetS() []byte
- func (x *CommonRequest) GetT() int64
- func (x *CommonRequest) GetU() int64
- func (*CommonRequest) ProtoMessage()
- func (x *CommonRequest) ProtoReflect() protoreflect.Message
- func (x *CommonRequest) Reset()
- func (x *CommonRequest) String() string
- type CommonResponse
- func (*CommonResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommonResponse) GetC() int64
- func (x *CommonResponse) GetD() *anypb.Any
- func (x *CommonResponse) GetE() []byte
- func (x *CommonResponse) GetM() string
- func (x *CommonResponse) GetN() []byte
- func (x *CommonResponse) GetP() int64
- func (x *CommonResponse) GetR() string
- func (x *CommonResponse) GetS() []byte
- func (x *CommonResponse) GetT() int64
- func (*CommonResponse) ProtoMessage()
- func (x *CommonResponse) ProtoReflect() protoreflect.Message
- func (x *CommonResponse) Reset()
- func (x *CommonResponse) String() string
- type CommonWorkerClient
- type CommonWorkerServer
- type Encrypt
- type TestRequest
- func (*TestRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TestRequest) GetMessage() string
- func (x *TestRequest) GetTimestamp() int64
- func (*TestRequest) ProtoMessage()
- func (x *TestRequest) ProtoReflect() protoreflect.Message
- func (x *TestRequest) Reset()
- func (x *TestRequest) String() string
- type TestResponse
- func (*TestResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TestResponse) GetReply() string
- func (x *TestResponse) GetServerTime() int64
- func (*TestResponse) ProtoMessage()
- func (x *TestResponse) ProtoReflect() protoreflect.Message
- func (x *TestResponse) Reset()
- func (x *TestResponse) String() string
- type UnimplementedCommonWorkerServer
- type UnsafeCommonWorkerServer
Constants ¶
const (
CommonWorker_Do_FullMethodName = "/pub_worker.CommonWorker/Do"
)
Variables ¶
var CommonWorker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pub_worker.CommonWorker", HandlerType: (*CommonWorkerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Do", Handler: _CommonWorker_Do_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "rpcx/proto/common_worker.proto", }
CommonWorker_ServiceDesc is the grpc.ServiceDesc for CommonWorker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_rpcx_proto_common_worker_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommonWorkerServer ¶ added in v1.1.0
func RegisterCommonWorkerServer(s grpc.ServiceRegistrar, srv CommonWorkerServer)
Types ¶
type CommonRequest ¶ added in v1.1.0
type CommonRequest struct {
D *anypb.Any `protobuf:"bytes,1,opt,name=d,proto3" json:"d,omitempty"` // 数据载体(当前 P=0 明文)
N []byte `protobuf:"bytes,2,opt,name=n,proto3" json:"n,omitempty"` // 随机数
S []byte `protobuf:"bytes,3,opt,name=s,proto3" json:"s,omitempty"` // SHA256 摘要 32B,见 impl.RPCXRequestDigestS
T int64 `protobuf:"varint,4,opt,name=t,proto3" json:"t,omitempty"` // 时间戳
E []byte `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` // Ed25519(s) 64B
R string `protobuf:"bytes,6,opt,name=r,proto3" json:"r,omitempty"` // 访问路由
P int64 `protobuf:"varint,7,opt,name=p,proto3" json:"p,omitempty"` // 计划类型(当前仅 0)
U int64 `protobuf:"varint,8,opt,name=u,proto3" json:"u,omitempty"` // 客户端ID
// contains filtered or unexported fields
}
func (*CommonRequest) Descriptor
deprecated
added in
v1.1.0
func (*CommonRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommonRequest.ProtoReflect.Descriptor instead.
func (*CommonRequest) GetD ¶ added in v1.1.0
func (x *CommonRequest) GetD() *anypb.Any
func (*CommonRequest) GetE ¶ added in v1.1.0
func (x *CommonRequest) GetE() []byte
func (*CommonRequest) GetN ¶ added in v1.1.0
func (x *CommonRequest) GetN() []byte
func (*CommonRequest) GetP ¶ added in v1.1.0
func (x *CommonRequest) GetP() int64
func (*CommonRequest) GetR ¶ added in v1.1.0
func (x *CommonRequest) GetR() string
func (*CommonRequest) GetS ¶ added in v1.1.0
func (x *CommonRequest) GetS() []byte
func (*CommonRequest) GetT ¶ added in v1.1.0
func (x *CommonRequest) GetT() int64
func (*CommonRequest) GetU ¶ added in v1.1.0
func (x *CommonRequest) GetU() int64
func (*CommonRequest) ProtoMessage ¶ added in v1.1.0
func (*CommonRequest) ProtoMessage()
func (*CommonRequest) ProtoReflect ¶ added in v1.1.0
func (x *CommonRequest) ProtoReflect() protoreflect.Message
func (*CommonRequest) Reset ¶ added in v1.1.0
func (x *CommonRequest) Reset()
func (*CommonRequest) String ¶ added in v1.1.0
func (x *CommonRequest) String() string
type CommonResponse ¶ added in v1.1.0
type CommonResponse struct {
D *anypb.Any `protobuf:"bytes,1,opt,name=d,proto3" json:"d,omitempty"` // 数据载体
N []byte `protobuf:"bytes,2,opt,name=n,proto3" json:"n,omitempty"` // 随机数
S []byte `protobuf:"bytes,3,opt,name=s,proto3" json:"s,omitempty"` // SHA256 摘要,见 impl.RPCXResponseDigestS
T int64 `protobuf:"varint,4,opt,name=t,proto3" json:"t,omitempty"` // 时间戳
E []byte `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` // Ed25519(s) 服务端签
R string `protobuf:"bytes,6,opt,name=r,proto3" json:"r,omitempty"` // 访问路由
P int64 `protobuf:"varint,7,opt,name=p,proto3" json:"p,omitempty"` // 计划类型
C int64 `protobuf:"varint,8,opt,name=c,proto3" json:"c,omitempty"` // 响应代码
M string `protobuf:"bytes,9,opt,name=m,proto3" json:"m,omitempty"` // 业务消息
// contains filtered or unexported fields
}
func (*CommonResponse) Descriptor
deprecated
added in
v1.1.0
func (*CommonResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead.
func (*CommonResponse) GetC ¶ added in v1.1.0
func (x *CommonResponse) GetC() int64
func (*CommonResponse) GetD ¶ added in v1.1.0
func (x *CommonResponse) GetD() *anypb.Any
func (*CommonResponse) GetE ¶ added in v1.1.0
func (x *CommonResponse) GetE() []byte
func (*CommonResponse) GetM ¶ added in v1.1.0
func (x *CommonResponse) GetM() string
func (*CommonResponse) GetN ¶ added in v1.1.0
func (x *CommonResponse) GetN() []byte
func (*CommonResponse) GetP ¶ added in v1.1.0
func (x *CommonResponse) GetP() int64
func (*CommonResponse) GetR ¶ added in v1.1.0
func (x *CommonResponse) GetR() string
func (*CommonResponse) GetS ¶ added in v1.1.0
func (x *CommonResponse) GetS() []byte
func (*CommonResponse) GetT ¶ added in v1.1.0
func (x *CommonResponse) GetT() int64
func (*CommonResponse) ProtoMessage ¶ added in v1.1.0
func (*CommonResponse) ProtoMessage()
func (*CommonResponse) ProtoReflect ¶ added in v1.1.0
func (x *CommonResponse) ProtoReflect() protoreflect.Message
func (*CommonResponse) Reset ¶ added in v1.1.0
func (x *CommonResponse) Reset()
func (*CommonResponse) String ¶ added in v1.1.0
func (x *CommonResponse) String() string
type CommonWorkerClient ¶ added in v1.1.0
type CommonWorkerClient interface {
Do(ctx context.Context, in *CommonRequest, opts ...grpc.CallOption) (*CommonResponse, error)
}
CommonWorkerClient is the client API for CommonWorker 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 NewCommonWorkerClient ¶ added in v1.1.0
func NewCommonWorkerClient(cc grpc.ClientConnInterface) CommonWorkerClient
type CommonWorkerServer ¶ added in v1.1.0
type CommonWorkerServer interface {
Do(context.Context, *CommonRequest) (*CommonResponse, error)
// contains filtered or unexported methods
}
CommonWorkerServer is the server API for CommonWorker service. All implementations must embed UnimplementedCommonWorkerServer for forward compatibility.
type Encrypt ¶ added in v1.1.0
type Encrypt struct {
D []byte `protobuf:"bytes,1,opt,name=d,proto3" json:"d,omitempty"` // 加密数据
N []byte `protobuf:"bytes,2,opt,name=n,proto3" json:"n,omitempty"` // 随机数
// contains filtered or unexported fields
}
func (*Encrypt) Descriptor
deprecated
added in
v1.1.0
func (*Encrypt) ProtoMessage ¶ added in v1.1.0
func (*Encrypt) ProtoMessage()
func (*Encrypt) ProtoReflect ¶ added in v1.1.0
func (x *Encrypt) ProtoReflect() protoreflect.Message
type TestRequest ¶ added in v1.1.0
type TestRequest struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*TestRequest) Descriptor
deprecated
added in
v1.1.0
func (*TestRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.
func (*TestRequest) GetMessage ¶ added in v1.1.0
func (x *TestRequest) GetMessage() string
func (*TestRequest) GetTimestamp ¶ added in v1.1.0
func (x *TestRequest) GetTimestamp() int64
func (*TestRequest) ProtoMessage ¶ added in v1.1.0
func (*TestRequest) ProtoMessage()
func (*TestRequest) ProtoReflect ¶ added in v1.1.0
func (x *TestRequest) ProtoReflect() protoreflect.Message
func (*TestRequest) Reset ¶ added in v1.1.0
func (x *TestRequest) Reset()
func (*TestRequest) String ¶ added in v1.1.0
func (x *TestRequest) String() string
type TestResponse ¶ added in v1.1.0
type TestResponse struct {
Reply string `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
ServerTime int64 `protobuf:"varint,2,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
// contains filtered or unexported fields
}
func (*TestResponse) Descriptor
deprecated
added in
v1.1.0
func (*TestResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.
func (*TestResponse) GetReply ¶ added in v1.1.0
func (x *TestResponse) GetReply() string
func (*TestResponse) GetServerTime ¶ added in v1.1.0
func (x *TestResponse) GetServerTime() int64
func (*TestResponse) ProtoMessage ¶ added in v1.1.0
func (*TestResponse) ProtoMessage()
func (*TestResponse) ProtoReflect ¶ added in v1.1.0
func (x *TestResponse) ProtoReflect() protoreflect.Message
func (*TestResponse) Reset ¶ added in v1.1.0
func (x *TestResponse) Reset()
func (*TestResponse) String ¶ added in v1.1.0
func (x *TestResponse) String() string
type UnimplementedCommonWorkerServer ¶ added in v1.1.0
type UnimplementedCommonWorkerServer struct{}
UnimplementedCommonWorkerServer 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 (UnimplementedCommonWorkerServer) Do ¶ added in v1.1.0
func (UnimplementedCommonWorkerServer) Do(context.Context, *CommonRequest) (*CommonResponse, error)
type UnsafeCommonWorkerServer ¶ added in v1.1.0
type UnsafeCommonWorkerServer interface {
// contains filtered or unexported methods
}
UnsafeCommonWorkerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommonWorkerServer will result in compilation errors.