telemetry

package
v0.0.0-...-58575ba Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgTypeES   = "ES"   // Engine Status
	MsgTypeER   = "ER"   // Engine Request
	MsgTypeERPC = "ERPC" // Engine RPC

	MsgTypeAS   = "AS"   // Adapter Status
	MsgTypeARPC = "ARPC" // Adapter RPC

	MsgTypeIndex = 0
)

Message types

Variables

This section is empty.

Functions

func Init

func Init(addr string)

Init initializes the system monitoring service.

func SendRPC

func SendRPC(id, status, route, url string, results int, at time.Time)

SendRPC queues an RPC status message onto the send channel.

func Shutdown

func Shutdown()

Shutdown should be called to gracefully stop the telemetry processes.

Types

type AdpRPCMsgType

type AdpRPCMsgType struct {
	AdpID   string
	ID      string
	Status  string
	Route   string
	URL     string
	Results int
	At      time.Time
}

AdpRPCMsgType represents the Engine Adapter Request messages.

func UnmarshalAdpRPCMsg

func UnmarshalAdpRPCMsg(m Message) (*AdpRPCMsgType, error)

UnmarshalAdpRPCMsg converts a Raw Message to an AdpRPCMsgType instance

func (AdpRPCMsgType) Marshal

func (r AdpRPCMsgType) Marshal() ([]byte, error)

Marshal converts a AdpRPCMsgType to a Raw Message.

type AdpStatusMsgType

type AdpStatusMsgType struct {
	Name   string
	Status string
	Addr   string
}

AdpStatusMsgType represents the Engine Status messages.

func UnmarshalAdpStatusMsg

func UnmarshalAdpStatusMsg(m Message) (*AdpStatusMsgType, error)

UnmarshalAdpStatusMsg converts a Raw Message to an AdpStatusMsgType instance

func (AdpStatusMsgType) Marshal

func (r AdpStatusMsgType) Marshal() ([]byte, error)

Marshal converts a AdpStatusMsgType to a Raw Message.

type EngRPCMsgType

type EngRPCMsgType struct {
	ID     string
	Status string
	Route  string
	At     time.Time
}

EngRPCMsgType represents the Engine Adapter Request messages.

func UnmarshalEngRPCMsg

func UnmarshalEngRPCMsg(m Message) (*EngRPCMsgType, error)

UnmarshalEngRPCMsg converts a Raw Message to an EngRPCMsgType instance

func (EngRPCMsgType) Marshal

func (r EngRPCMsgType) Marshal() ([]byte, error)

Marshal converts a EngRPCMsgType to a Raw Message.

type EngRequestMsgType

type EngRequestMsgType struct {
	ID     string
	Rtype  string
	Status string
	AreaID string
	At     time.Time
}

EngRequestMsgType represents the Engine Request messages.

func UnmarshalEngRequestMsg

func UnmarshalEngRequestMsg(m Message) (*EngRequestMsgType, error)

UnmarshalEngRequestMsg converts a Raw Message to an EngRequestMsgType instance

func (EngRequestMsgType) Marshal

func (r EngRequestMsgType) Marshal() ([]byte, error)

Marshal converts a EngRequestMsgType to a Raw Message.

type EngStatusMsgType

type EngStatusMsgType struct {
	Name     string
	Status   string
	Adapters string
	Addr     string
}

EngStatusMsgType represents the Engine Status messages.

func UnmarshalEngStatusMsg

func UnmarshalEngStatusMsg(m Message) (*EngStatusMsgType, error)

UnmarshalEngStatusMsg converts a Raw Message to an EngStatusMsgType instance

func (EngStatusMsgType) Marshal

func (r EngStatusMsgType) Marshal() ([]byte, error)

Marshal converts a EngStatusMsgType to a Raw Message.

type Message

type Message struct {
	// contains filtered or unexported fields
}

Message represents a Raw tatus Message (i.e. text).

func NewMessage

func NewMessage(b []byte, n int) (Message, error)

NewMessage converts a Raw Message ([]byte) into a Message.

func NewMessageTest

func NewMessageTest(msg []string) Message

NewMessageTest returns a Raw Message from an array of strings. It is for testing purposes only.

func (*Message) Data

func (r *Message) Data() []string

Data returns data (Raw Message).

func (*Message) Key

func (r *Message) Key() string

Key returns the message key.

func (*Message) Mtype

func (r *Message) Mtype() string

Mtype returns the message type (mType).

func (Message) String

func (r Message) String() string

Jump to

Keyboard shortcuts

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