mondemand

package module
v0.0.0-...-70101be Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Golang API for mondemand.

Documentation

Index

Constants

View Source
const (
	StatMsg      = MessageType("MonDemand::StatsMsg")
	StatsMsgType = MessageType("MonDemand::StatsMsg")
	PerfMsgType  = MessageType("MonDemand::PerfMsg")
	TraceMsgType = MessageType("MonDemand::TraceMsg")
)
View Source
const (
	GaugeType   = MetricType("gauge")
	CounterType = MetricType("counter")
	UnknownType = MetricType("unknown")
)
View Source
const (
	ProgIdLabel   = "mondemand.prog_id"
	TraceIdLabel  = "mondemand.trace_id"
	OwnerLabel    = "mondemand.owner"
	HostnameLabel = "mondemand.src_host"
	MessageLabel  = "mondemand.message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context map[string]string

func DecodeContext

func DecodeContext(event *lwes.LwesEvent) Context

type MessageType

type MessageType string

type Metric

type Metric struct {
	Typ   MetricType
	Key   string
	Value int64
}

type MetricType

type MetricType string

type PerfMsg

type PerfMsg struct {
	Context     Context
	Timelines   []*Timeline
	CallerLabel string
	PerfId      string
	ReceiptTime int64
	SenderIP    net.IP
	SenderPort  uint16
}

func DecodePerfMsg

func DecodePerfMsg(lwe *lwes.LwesEvent) PerfMsg

func (*PerfMsg) String

func (msg *PerfMsg) String() string

type StatsMsg

type StatsMsg struct {
	ProgId  string
	Metrics []*Metric
	Context Context
}

func DecodeStatsMsg

func DecodeStatsMsg(event *lwes.LwesEvent) StatsMsg

func NewStatsMsg

func NewStatsMsg(progId string) *StatsMsg

func (*StatsMsg) AddContext

func (st *StatsMsg) AddContext(key, value string)

func (*StatsMsg) AddMetric

func (st *StatsMsg) AddMetric(tag MetricType, key string, value int64)

func (*StatsMsg) ToLwes

func (st *StatsMsg) ToLwes() *lwes.LwesEvent

type Timeline

type Timeline struct {
	Label      string
	Start, End time.Time
}

type TraceMsg

type TraceMsg struct {
	ProgId   string
	TraceId  string
	Owner    string
	Hostname string
	Message  string
	Extra    map[string]interface{}
}

func DecodeTraceMsg

func DecodeTraceMsg(event *lwes.LwesEvent) TraceMsg

Jump to

Keyboard shortcuts

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