message

package
v0.0.0-...-ab997d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	Decode(interface{}) error
}

func NewDecoder

func NewDecoder(r io.Reader) Decoder

type Encoder

type Encoder interface {
	Encode(interface{}) error
}

func NewEncoder

func NewEncoder(w io.Writer) Encoder

type Event

type Event struct {
	Tag    string                 `codec:"tag"`
	Time   time.Time              `codec:"time"`
	Record map[string]interface{} `codec:"record"`
}

func NewEvent

func NewEvent(tag string, v map[string]interface{}) *Event

func NewEventWithTime

func NewEventWithTime(tag string, time time.Time, r map[string]interface{}) *Event

type Message

type Message struct {
	Type    MessageType
	UnitID  int32
	Payload interface{}
}

func (*Message) Decode

func (m *Message) Decode(dec Decoder) (err error)

func (*Message) Encode

func (m *Message) Encode(enc Encoder) (err error)

type MessageType

type MessageType uint8
const (
	TypInfoRequest MessageType = iota
	TypInfoResponse
	TypBufferOption
	TypConfigure
	TypStart
	TypStop
	TypTerminated
	TypEvent
	TypEventChain
	TypStdout
)

type PluginInfo

type PluginInfo struct {
	ProtoVer uint8 `codec:"proto_ver"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL