Documentation
¶
Index ¶
- Variables
- type Codec
- func (c *Codec) DecodeCommand(ctx context.Context, streamType string, commandType string, bytes []byte) (payload interface{}, err error)
- func (c *Codec) DecodeReply(ctx context.Context, streamType string, replyType string, bytes []byte) (payload interface{}, err error)
- func (c *Codec) EncodeCommand(ctx context.Context, streamType string, commandType string, ...) (bytes []byte, err error)
- func (c *Codec) EncodeReply(ctx context.Context, streamType string, replyType string, payload interface{}) (bytes []byte, err error)
- func (c *Codec) Stream(streamType string) *Stream
- type Command
- type Reply
- type Stream
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCommandEncoderNotFound = errors.New("command encoder not found") ErrCommandDecoderNotFound = errors.New("command decoder not found") ErrReplyDecoderNotFound = errors.New("reply decoder not found") ErrReplyEncoderNotFound = errors.New("reply encoder not found") ErrNoStream = errors.New("no stream type") )
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
func (*Codec) DecodeCommand ¶
func (*Codec) DecodeReply ¶
func (*Codec) EncodeCommand ¶
func (*Codec) EncodeReply ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) Command ¶
func (s *Stream) Command(name string, enc es.EncodeFunc, dec es.DecodeFunc) *Stream
func (*Stream) Reply ¶
func (s *Stream) Reply(name string, enc es.EncodeFunc, dec es.DecodeFunc) *Stream
Click to show internal directories.
Click to hide internal directories.