Documentation
¶
Overview ¶
Package vanflow defines types for the message and record types specified in the VanFlow specification.
Index ¶
- func Decode(msg *amqp.Message) (interface{}, error)
- type BaseRecord
- type BeaconMessage
- type CollectorRecord
- type ConnectorRecord
- type ControllerRecord
- type EgressRecord
- type FlowRecord
- type FlushMessage
- type HeartbeatMessage
- type HostRecord
- type ImageRecord
- type IngressRecord
- type LinkRecord
- type ListenerRecord
- type LogRecord
- type MessageProps
- type ProcessGroupRecord
- type ProcessRecord
- type Record
- type RecordMessage
- type RouterRecord
- type SiteRecord
- type Time
- type TypeMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRecord ¶
type BaseRecord struct {
ID string `vflow:"1,required"`
StartTime *Time `vflow:"3"`
EndTime *Time `vflow:"4"`
}
func (BaseRecord) Identity ¶
func (b BaseRecord) Identity() string
type BeaconMessage ¶
type BeaconMessage struct {
MessageProps
Version uint32
SourceType string
Address string
Direct string
Identity string
}
func DecodeBeacon ¶
func DecodeBeacon(msg *amqp.Message) BeaconMessage
func (BeaconMessage) Encode ¶
func (m BeaconMessage) Encode() *amqp.Message
type CollectorRecord ¶
type CollectorRecord struct {
BaseRecord
}
type ConnectorRecord ¶
type ConnectorRecord struct {
BaseRecord
Parent *string `vflow:"2"`
DestHost *string `vflow:"15"`
Protocol *string `vflow:"16"`
DestPort *string `vflow:"18"`
Address *string `vflow:"19"`
FlowCountL4 *uint64 `vflow:"40"`
FlowCountL7 *uint64 `vflow:"41"`
FlowRateL4 *uint64 `vflow:"42"`
FlowRateL7 *uint64 `vflow:"43"`
}
func (ConnectorRecord) GetTypeMeta ¶
func (r ConnectorRecord) GetTypeMeta() TypeMeta
type ControllerRecord ¶
type ControllerRecord struct {
BaseRecord
Parent *string `vflow:"2"`
ImageName *string `vflow:"20"`
ImageVersion *string `vflow:"21"`
Hostname *string `vflow:"22"`
Name *string `vflow:"30"`
BuildVersion *string `vflow:"32"`
}
func (ControllerRecord) GetTypeMeta ¶
func (r ControllerRecord) GetTypeMeta() TypeMeta
type EgressRecord ¶
type EgressRecord struct {
BaseRecord
}
type FlowRecord ¶
type FlowRecord struct {
BaseRecord
Parent *string `vflow:"2"`
Counterflow *string `vflow:"5"`
SourceHost *string `vflow:"14"`
SourcePort *string `vflow:"17"`
Octets *uint64 `vflow:"23"`
Latency *uint64 `vflow:"24"`
Reason *string `vflow:"29"`
Trace *string `vflow:"31"`
OctetRate *uint64 `vflow:"35"`
OctetsOut *uint64 `vflow:"36"`
OctetsUnacked *uint64 `vflow:"37"`
WindowClosures *uint64 `vflow:"38"`
WindowSize *uint64 `vflow:"39"`
Method *string `vflow:"27"`
Result *string `vflow:"28"`
}
func (FlowRecord) GetTypeMeta ¶
func (r FlowRecord) GetTypeMeta() TypeMeta
type FlushMessage ¶
type FlushMessage struct {
MessageProps
}
func DecodeFlush ¶
func DecodeFlush(msg *amqp.Message) FlushMessage
func (FlushMessage) Encode ¶
func (m FlushMessage) Encode() *amqp.Message
type HeartbeatMessage ¶
type HeartbeatMessage struct {
MessageProps
Identity string
Version uint32
Now uint64
}
func DecodeHeartbeat ¶
func DecodeHeartbeat(msg *amqp.Message) HeartbeatMessage
func (HeartbeatMessage) Encode ¶
func (m HeartbeatMessage) Encode() *amqp.Message
type HostRecord ¶
type HostRecord struct {
BaseRecord
Provider *string `vflow:"10"`
Name *string `vflow:"30"`
}
func (HostRecord) GetTypeMeta ¶
func (r HostRecord) GetTypeMeta() TypeMeta
type ImageRecord ¶
type ImageRecord struct {
BaseRecord
}
type IngressRecord ¶
type IngressRecord struct {
BaseRecord
}
type LinkRecord ¶
type LinkRecord struct {
BaseRecord
Parent *string `vflow:"2"`
Mode *string `vflow:"13"`
Name *string `vflow:"30"`
LinkCost *uint64 `vflow:"33"`
Direction *string `vflow:"34"`
}
func (LinkRecord) GetTypeMeta ¶
func (r LinkRecord) GetTypeMeta() TypeMeta
type ListenerRecord ¶
type ListenerRecord struct {
BaseRecord
Parent *string `vflow:"2"`
DestHost *string `vflow:"15"`
Protocol *string `vflow:"16"`
DestPort *string `vflow:"18"`
Address *string `vflow:"19"`
FlowCountL4 *uint64 `vflow:"40"`
FlowCountL7 *uint64 `vflow:"41"`
FlowRateL4 *uint64 `vflow:"42"`
FlowRateL7 *uint64 `vflow:"43"`
}
func (ListenerRecord) GetTypeMeta ¶
func (r ListenerRecord) GetTypeMeta() TypeMeta
type LogRecord ¶
type LogRecord struct {
BaseRecord
LogSeverity *uint64 `vflow:"48"`
LogText *string `vflow:"49"`
SourceFile *string `vflow:"50"`
SourceLine *uint64 `vflow:"51"`
}
func (LogRecord) GetTypeMeta ¶
type MessageProps ¶
type ProcessGroupRecord ¶
type ProcessGroupRecord struct {
BaseRecord
}
type ProcessRecord ¶
type ProcessRecord struct {
BaseRecord
Parent *string `vflow:"2"` //unspeced
Mode *string `vflow:"13"`
SourceHost *string `vflow:"14"`
ImageName *string `vflow:"20"`
ImageVersion *string `vflow:"21"`
Hostname *string `vflow:"22"`
Name *string `vflow:"30"`
Group *string `vflow:"46"`
}
func (ProcessRecord) GetTypeMeta ¶
func (r ProcessRecord) GetTypeMeta() TypeMeta
type RecordMessage ¶
type RecordMessage struct {
MessageProps
Records []Record
}
func DecodeRecord ¶
func DecodeRecord(msg *amqp.Message) (record RecordMessage, err error)
type RouterRecord ¶
type RouterRecord struct {
BaseRecord
Parent *string `vflow:"2"`
Namespace *string `vflow:"12"`
Mode *string `vflow:"13"`
ImageName *string `vflow:"20"`
ImageVersion *string `vflow:"21"`
Hostname *string `vflow:"22"`
Name *string `vflow:"30"`
BuildVersion *string `vflow:"32"`
}
func (RouterRecord) GetTypeMeta ¶
func (r RouterRecord) GetTypeMeta() TypeMeta
type SiteRecord ¶
type SiteRecord struct {
BaseRecord
Location *string `vflow:"9"`
Provider *string `vflow:"10"`
Platform *string `vflow:"11"`
Namespace *string `vflow:"12"`
Name *string `vflow:"30"` //unspeced
Version *string `vflow:"52"`
Policy *string `vflow:"53"`
}
func (SiteRecord) GetTypeMeta ¶
func (r SiteRecord) GetTypeMeta() TypeMeta
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
vanflow-tool
command
|
|
|
encoding exposes functionality to convert between an arbitray maps and native Go structs in service of the Vanflow protocol.
|
encoding exposes functionality to convert between an arbitray maps and native Go structs in service of the Vanflow protocol. |
|
The eventsource package contains mechanisims for discovering and interracting with vanflow event sources.
|
The eventsource package contains mechanisims for discovering and interracting with vanflow event sources. |
|
session implements amqp connection and session management though the concept of a Container, inspired by the Conatiner interface exposed by the qpid proton amqp libraries.
|
session implements amqp connection and session management though the concept of a Container, inspired by the Conatiner interface exposed by the qpid proton amqp libraries. |
|
store contains an interface for accumulating and accessing vanflow record state, as well as an in memory cache implementation that stores records in a synchronized map.
|
store contains an interface for accumulating and accessing vanflow record state, as well as an in memory cache implementation that stores records in a synchronized map. |
|
vancap
module
|
Click to show internal directories.
Click to hide internal directories.