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 struct { Version int `json:"version"` UUID string `json:"uuid"` // Nanosecond Timestamp int64 `json:"timestamp"` } Data struct { Headers map[string]string `json:"headers"` Method string `json:"method"` Request string `json:"request"` } }
Message represents data across plugins
Click to show internal directories.
Click to hide internal directories.