Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶
MarshalJSON encodes m to Protobuf JSON representation.
Types ¶
type ErrUnexpectedMessageType ¶
type ErrUnexpectedMessageType struct {
// contains filtered or unexported fields
}
ErrUnexpectedMessageType is an error that is used to indicate message mismatch.
func NewUnexpectedMessageType ¶
func NewUnexpectedMessageType(act, exp any) ErrUnexpectedMessageType
NewUnexpectedMessageType initializes an error about message mismatch between act and exp.
func (ErrUnexpectedMessageType) Error ¶
func (e ErrUnexpectedMessageType) Error() string
type GRPCConvertedMessage ¶
GRPCConvertedMessage is an interface of the gRPC message that is used for Message encoding/decoding.
type Message ¶
type Message interface { // Must return gRPC message that can // be used for gRPC protocol transmission. ToGRPCMessage() grpc.Message // Must restore the message from related // gRPC message. // // If gRPC message is not a related one, // ErrUnexpectedMessageType can be returned // to indicate this. FromGRPCMessage(grpc.Message) error }
Message represents raw Protobuf message that can be transmitted via several transport protocols.
Click to show internal directories.
Click to hide internal directories.