message

package
v0.0.0-...-4f042ae Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MessageStartEvent should be used as part of UDPMessage when an event is starting
	MessageStartEvent = MessageType(iota)
	// MessageEndEvent should be used as part of UDPMessage when an event is finishing
	MessageEndEvent
	// MessageSingleEvent should be used to indicate a point-in-time event
	MessageSingleEvent
	// MessageNewContextInstance Start a new context instance
	MessageNewTimeline
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageParseError

type MessageParseError string

func (*MessageParseError) DecodeMsg

func (z *MessageParseError) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (MessageParseError) EncodeMsg

func (z MessageParseError) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (MessageParseError) Error

func (m MessageParseError) Error() string

func (MessageParseError) MarshalMsg

func (z MessageParseError) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MessageParseError) Msgsize

func (z MessageParseError) Msgsize() (s int)

func (*MessageParseError) UnmarshalMsg

func (z *MessageParseError) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageType

type MessageType int

MessageType is used to indicate the difference between a start and end event

func ParseMessageType

func ParseMessageType(s string) (MessageType, error)

func (*MessageType) DecodeMsg

func (z *MessageType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (MessageType) EncodeMsg

func (z MessageType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (MessageType) MarshalMsg

func (z MessageType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MessageType) Msgsize

func (z MessageType) Msgsize() (s int)

func (MessageType) String

func (m MessageType) String() string

func (*MessageType) UnmarshalMsg

func (z *MessageType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type UDPMessage

type UDPMessage struct {
	Context        string      `msg:"context"`
	Name           string      `msg:"name"`
	Type           MessageType `msg:"type"`
	Time           time.Time   `msg:"time"`
	Host           string      `msg:"host"`
	FillHostWithIP bool        `msg:"autoIP"`
}

UDPMessage is a binary serializable message for UDP

func (*UDPMessage) DecodeMsg

func (z *UDPMessage) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*UDPMessage) EncodeMsg

func (z *UDPMessage) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*UDPMessage) MarshalMsg

func (z *UDPMessage) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*UDPMessage) Msgsize

func (z *UDPMessage) Msgsize() (s int)

func (*UDPMessage) UnmarshalMsg

func (z *UDPMessage) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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