Documentation
¶
Index ¶
- Constants
- func NewSRPCEchoerHandler(impl SRPCEchoerServer, serviceID string) srpc.Handler
- func SRPCRegisterEchoer(mux srpc.Mux, impl SRPCEchoerServer) error
- type EchoMsg
- func (m *EchoMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *EchoMsg) CloneVT() *EchoMsg
- func (this *EchoMsg) EqualMessageVT(thatMsg any) bool
- func (this *EchoMsg) EqualVT(that *EchoMsg) bool
- func (x *EchoMsg) GetBody() string
- func (x *EchoMsg) MarshalJSON() ([]byte, error)
- func (x *EchoMsg) MarshalProtoJSON(s *json.MarshalState)
- func (x *EchoMsg) MarshalProtoText() string
- func (m *EchoMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *EchoMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *EchoMsg) MarshalVT() (dAtA []byte, err error)
- func (*EchoMsg) ProtoMessage()
- func (x *EchoMsg) Reset()
- func (m *EchoMsg) SizeVT() (n int)
- func (x *EchoMsg) String() string
- func (x *EchoMsg) UnmarshalJSON(b []byte) error
- func (x *EchoMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *EchoMsg) UnmarshalVT(dAtA []byte) error
- type ExampleMsg
- func (m *ExampleMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ExampleMsg) CloneVT() *ExampleMsg
- func (this *ExampleMsg) EqualMessageVT(thatMsg any) bool
- func (this *ExampleMsg) EqualVT(that *ExampleMsg) bool
- func (x *ExampleMsg) GetExampleField() string
- func (x *ExampleMsg) GetOtherMsg() *other.OtherMsg
- func (x *ExampleMsg) MarshalJSON() ([]byte, error)
- func (x *ExampleMsg) MarshalProtoJSON(s *json.MarshalState)
- func (x *ExampleMsg) MarshalProtoText() string
- func (m *ExampleMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ExampleMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *ExampleMsg) MarshalVT() (dAtA []byte, err error)
- func (*ExampleMsg) ProtoMessage()
- func (x *ExampleMsg) Reset()
- func (m *ExampleMsg) SizeVT() (n int)
- func (x *ExampleMsg) String() string
- func (x *ExampleMsg) UnmarshalJSON(b []byte) error
- func (x *ExampleMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ExampleMsg) UnmarshalVT(dAtA []byte) error
- type SRPCEchoerClient
- type SRPCEchoerHandler
- type SRPCEchoerServer
- type SRPCEchoer_EchoStream
Constants ¶
const SRPCEchoerServiceID = "example.Echoer"
Variables ¶
This section is empty.
Functions ¶
func NewSRPCEchoerHandler ¶ added in v0.29.0
func NewSRPCEchoerHandler(impl SRPCEchoerServer, serviceID string) srpc.Handler
NewSRPCEchoerHandler constructs a new RPC handler. serviceID: if empty, uses default: example.Echoer
func SRPCRegisterEchoer ¶ added in v0.29.0
func SRPCRegisterEchoer(mux srpc.Mux, impl SRPCEchoerServer) error
SRPCRegisterEchoer registers the implementation with the mux. Uses the default serviceID: example.Echoer
Types ¶
type EchoMsg ¶ added in v0.29.0
type EchoMsg struct {
Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
EchoMsg is the message body for Echo.
func (*EchoMsg) CloneMessageVT ¶ added in v0.29.0
func (m *EchoMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*EchoMsg) EqualMessageVT ¶ added in v0.29.0
func (*EchoMsg) MarshalJSON ¶ added in v0.29.0
MarshalJSON marshals the EchoMsg to JSON.
func (*EchoMsg) MarshalProtoJSON ¶ added in v0.29.0
func (x *EchoMsg) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the EchoMsg message to JSON.
func (*EchoMsg) MarshalProtoText ¶ added in v0.29.0
func (*EchoMsg) MarshalToSizedBufferVT ¶ added in v0.29.0
func (*EchoMsg) MarshalToVT ¶ added in v0.29.0
func (*EchoMsg) ProtoMessage ¶ added in v0.29.0
func (*EchoMsg) ProtoMessage()
func (*EchoMsg) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON unmarshals the EchoMsg from JSON.
func (*EchoMsg) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *EchoMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the EchoMsg message from JSON.
func (*EchoMsg) UnmarshalVT ¶ added in v0.29.0
type ExampleMsg ¶
type ExampleMsg struct {
// ExampleField is an example field.
ExampleField string `protobuf:"bytes,1,opt,name=example_field,json=exampleField,proto3" json:"exampleField,omitempty"`
// OtherMsg is an example of an imported message field.
OtherMsg *other.OtherMsg `protobuf:"bytes,2,opt,name=other_msg,json=otherMsg,proto3" json:"otherMsg,omitempty"`
// contains filtered or unexported fields
}
ExampleMsg is an example message.
func (*ExampleMsg) CloneMessageVT ¶
func (m *ExampleMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ExampleMsg) CloneVT ¶
func (m *ExampleMsg) CloneVT() *ExampleMsg
func (*ExampleMsg) EqualMessageVT ¶
func (this *ExampleMsg) EqualMessageVT(thatMsg any) bool
func (*ExampleMsg) EqualVT ¶
func (this *ExampleMsg) EqualVT(that *ExampleMsg) bool
func (*ExampleMsg) GetExampleField ¶
func (x *ExampleMsg) GetExampleField() string
func (*ExampleMsg) GetOtherMsg ¶
func (x *ExampleMsg) GetOtherMsg() *other.OtherMsg
func (*ExampleMsg) MarshalJSON ¶
func (x *ExampleMsg) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ExampleMsg to JSON.
func (*ExampleMsg) MarshalProtoJSON ¶
func (x *ExampleMsg) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ExampleMsg message to JSON.
func (*ExampleMsg) MarshalProtoText ¶
func (x *ExampleMsg) MarshalProtoText() string
func (*ExampleMsg) MarshalToSizedBufferVT ¶
func (m *ExampleMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ExampleMsg) MarshalToVT ¶
func (m *ExampleMsg) MarshalToVT(dAtA []byte) (int, error)
func (*ExampleMsg) MarshalVT ¶
func (m *ExampleMsg) MarshalVT() (dAtA []byte, err error)
func (*ExampleMsg) ProtoMessage ¶
func (*ExampleMsg) ProtoMessage()
func (*ExampleMsg) Reset ¶
func (x *ExampleMsg) Reset()
func (*ExampleMsg) SizeVT ¶
func (m *ExampleMsg) SizeVT() (n int)
func (*ExampleMsg) String ¶
func (x *ExampleMsg) String() string
func (*ExampleMsg) UnmarshalJSON ¶
func (x *ExampleMsg) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ExampleMsg from JSON.
func (*ExampleMsg) UnmarshalProtoJSON ¶
func (x *ExampleMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ExampleMsg message from JSON.
func (*ExampleMsg) UnmarshalVT ¶
func (m *ExampleMsg) UnmarshalVT(dAtA []byte) error
type SRPCEchoerClient ¶ added in v0.29.0
type SRPCEchoerClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// Echo returns the given message.
Echo(ctx context.Context, in *EchoMsg) (*EchoMsg, error)
}
func NewSRPCEchoerClient ¶ added in v0.29.0
func NewSRPCEchoerClient(cc srpc.Client) SRPCEchoerClient
func NewSRPCEchoerClientWithServiceID ¶ added in v0.29.0
func NewSRPCEchoerClientWithServiceID(cc srpc.Client, serviceID string) SRPCEchoerClient
type SRPCEchoerHandler ¶ added in v0.29.0
type SRPCEchoerHandler struct {
// contains filtered or unexported fields
}
func (SRPCEchoerHandler) GetMethodIDs ¶ added in v0.29.0
func (SRPCEchoerHandler) GetMethodIDs() []string
func (*SRPCEchoerHandler) GetServiceID ¶ added in v0.29.0
func (d *SRPCEchoerHandler) GetServiceID() string
func (*SRPCEchoerHandler) InvokeMethod ¶ added in v0.29.0
func (SRPCEchoerHandler) InvokeMethod_Echo ¶ added in v0.29.0
func (SRPCEchoerHandler) InvokeMethod_Echo(impl SRPCEchoerServer, strm srpc.Stream) error