Documentation
¶
Index ¶
Constants ¶
View Source
const CodecJsonName = "json"
View Source
const CodecSimpleName = "simple"
Variables ¶
This section is empty.
Functions ¶
func RegisterCodec ¶
func RegisterCodec(codec Codec)
Types ¶
type Codec ¶
type Codec interface {
// Marshal returns the wire format of v.
Marshal(v *Message) ([]byte, error)
// Unmarshal parses the wire format into v.
Unmarshal(data []byte, v *Message) error
// Name returns the name of the Codec implementation. The returned string
// will be used as part of content type in transmission. The result must be
// static; the result cannot change between calls.
Name() string
}
type CodecSimple ¶
type CodecSimple struct{}
func (CodecSimple) Name ¶
func (c CodecSimple) Name() string
type Message ¶
type Message struct {
Meta Meta `json:"meta"`
Method string `json:"method"`
Request *MsgItem `json:"request"`
Response *MsgItem `json:"response"`
}
Message represents data across plugins
Click to show internal directories.
Click to hide internal directories.