Documentation ¶
Index ¶
- Variables
- func SFMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
- type Agent
- type AgentAllocator
- type EthMetric
- func (obj *EthMetric) GetField(key string) (interface{}, error)
- func (obj *EthMetric) GetFieldBool(key string) (bool, error)
- func (obj *EthMetric) GetFieldInt64(key string) (int64, error)
- func (obj *EthMetric) GetFieldKeys() []string
- func (obj *EthMetric) GetFieldString(key string) (string, error)
- func (v EthMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v EthMetric) MarshalJSON() ([]byte, error)
- func (obj *EthMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *EthMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *EthMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *EthMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EthMetric) UnmarshalJSON(data []byte) error
- type IfMetric
- func (obj *IfMetric) GetField(key string) (interface{}, error)
- func (obj *IfMetric) GetFieldBool(key string) (bool, error)
- func (obj *IfMetric) GetFieldInt64(key string) (int64, error)
- func (obj *IfMetric) GetFieldKeys() []string
- func (obj *IfMetric) GetFieldString(key string) (string, error)
- func (v IfMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v IfMetric) MarshalJSON() ([]byte, error)
- func (obj *IfMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *IfMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *IfMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *IfMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *IfMetric) UnmarshalJSON(data []byte) error
- type OvsMetric
- func (obj *OvsMetric) GetField(key string) (interface{}, error)
- func (obj *OvsMetric) GetFieldBool(key string) (bool, error)
- func (obj *OvsMetric) GetFieldInt64(key string) (int64, error)
- func (obj *OvsMetric) GetFieldKeys() []string
- func (obj *OvsMetric) GetFieldString(key string) (string, error)
- func (v OvsMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v OvsMetric) MarshalJSON() ([]byte, error)
- func (obj *OvsMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *OvsMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *OvsMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *OvsMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *OvsMetric) UnmarshalJSON(data []byte) error
- type SFMetric
- func (sm *SFMetric) Add(m common.Metric) common.Metric
- func (obj *SFMetric) GetField(key string) (interface{}, error)
- func (obj *SFMetric) GetFieldBool(key string) (bool, error)
- func (obj *SFMetric) GetFieldInt64(key string) (int64, error)
- func (obj *SFMetric) GetFieldKeys() []string
- func (obj *SFMetric) GetFieldString(key string) (string, error)
- func (sm *SFMetric) GetLast() int64
- func (sm *SFMetric) GetStart() int64
- func (sm *SFMetric) IsZero() bool
- func (v SFMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v SFMetric) MarshalJSON() ([]byte, error)
- func (obj *SFMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *SFMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *SFMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (sm *SFMetric) SetLast(last int64)
- func (sm *SFMetric) SetStart(start int64)
- func (sm *SFMetric) Split(cut int64) (common.Metric, common.Metric)
- func (sm *SFMetric) Sub(m common.Metric) common.Metric
- func (v *SFMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SFMetric) UnmarshalJSON(data []byte) error
- type SFlow
- func (obj *SFlow) GetField(key string) (interface{}, error)
- func (obj *SFlow) GetFieldBool(key string) (bool, error)
- func (obj *SFlow) GetFieldInt64(key string) (int64, error)
- func (obj *SFlow) GetFieldKeys() []string
- func (obj *SFlow) GetFieldString(key string) (string, error)
- func (v SFlow) MarshalEasyJSON(w *jwriter.Writer)
- func (v SFlow) MarshalJSON() ([]byte, error)
- func (obj *SFlow) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *SFlow) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *SFlow) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *SFlow) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SFlow) UnmarshalJSON(data []byte) error
- type VlanMetric
- func (obj *VlanMetric) GetField(key string) (interface{}, error)
- func (obj *VlanMetric) GetFieldBool(key string) (bool, error)
- func (obj *VlanMetric) GetFieldInt64(key string) (int64, error)
- func (obj *VlanMetric) GetFieldKeys() []string
- func (obj *VlanMetric) GetFieldString(key string) (string, error)
- func (v VlanMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v VlanMetric) MarshalJSON() ([]byte, error)
- func (obj *VlanMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *VlanMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *VlanMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *VlanMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *VlanMetric) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAgentAlreadyAllocated error agent already allocated for this uuid ErrAgentAlreadyAllocated = errors.New("agent already allocated for this uuid") )
Functions ¶
func SFMetadataDecoder ¶ added in v0.22.0
func SFMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
SFMetadataDecoder implements a json message raw decoder
Types ¶
type Agent ¶ added in v0.21.0
type Agent struct { insanelock.RWMutex UUID string FlowTable *flow.Table Conn *net.UDPConn Addr string Port int BPFFilter string HeaderSize uint32 Graph *graph.Graph Node *graph.Node }
Agent describes SFlow agent probe
func NewAgent ¶ added in v0.21.0
func NewAgent(u string, conn *net.UDPConn, addr string, port int, ft *flow.Table, bpfFilter string, headerSize uint32, n *graph.Node, g *graph.Graph) *Agent
NewAgent creates a new sFlow agent which will populate the given flowtable
type AgentAllocator ¶ added in v0.21.0
type AgentAllocator struct { insanelock.RWMutex // contains filtered or unexported fields }
AgentAllocator describes an SFlow agent allocator to manage multiple SFlow agent probe
func NewAgentAllocator ¶ added in v0.21.0
func NewAgentAllocator() (*AgentAllocator, error)
NewAgentAllocator creates a new sFlow agent allocator
func (*AgentAllocator) Alloc ¶ added in v0.21.0
func (a *AgentAllocator) Alloc(uuid string, ft *flow.Table, bpfFilter string, headerSize uint32, addr *service.Address, n *graph.Node, g *graph.Graph) (*Agent, error)
Alloc allocates a new sFlow agent
func (*AgentAllocator) Release ¶ added in v0.21.0
func (a *AgentAllocator) Release(uuid string)
Release a sFlow agent
func (*AgentAllocator) ReleaseAll ¶ added in v0.21.0
func (a *AgentAllocator) ReleaseAll()
ReleaseAll sFlow agents
type EthMetric ¶ added in v0.23.0
type EthMetric struct { EthAlignmentErrors int64 `json:"EthAlignmentErrors,omitempty"` EthFCSErrors int64 `json:"EthFCSErrors,omitempty"` EthSingleCollisionFrames int64 `json:"EthSingleCollisionFrames,omitempty"` EthMultipleCollisionFrames int64 `json:"EthMultipleCollisionFrames,omitempty"` EthSQETestErrors int64 `json:"EthSQETestErrors,omitempty"` EthDeferredTransmissions int64 `json:"EthDeferredTransmissions,omitempty"` EthLateCollisions int64 `json:"EthLateCollisions,omitempty"` EthExcessiveCollisions int64 `json:"EthExcessiveCollisions,omitempty"` EthInternalMacReceiveErrors int64 `json:"EthInternalMacReceiveErrors,omitempty"` EthInternalMacTransmitErrors int64 `json:"EthInternalMacTransmitErrors,omitempty"` EthCarrierSenseErrors int64 `json:"EthCarrierSenseErrors,omitempty"` EthFrameTooLongs int64 `json:"EthFrameTooLongs,omitempty"` EthSymbolErrors int64 `json:"EthSymbolErrors,omitempty"` }
EthMetric the SFlow ethernet counters easyjson:json gendecoder
func (*EthMetric) GetFieldBool ¶ added in v0.26.0
func (*EthMetric) GetFieldInt64 ¶ added in v0.26.0
func (*EthMetric) GetFieldKeys ¶ added in v0.26.0
func (*EthMetric) GetFieldString ¶ added in v0.26.0
func (EthMetric) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (EthMetric) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*EthMetric) MatchBool ¶ added in v0.26.0
func (obj *EthMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*EthMetric) MatchInt64 ¶ added in v0.26.0
func (obj *EthMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*EthMetric) MatchString ¶ added in v0.26.0
func (obj *EthMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*EthMetric) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EthMetric) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type IfMetric ¶ added in v0.23.0
type IfMetric struct { IfInOctets int64 `json:"IfInOctets,omitempty"` IfInUcastPkts int64 `json:"IfInUcastPkts,omitempty"` IfInMulticastPkts int64 `json:"IfInMulticastPkts,omitempty"` IfInBroadcastPkts int64 `json:"IfInBroadcastPkts,omitempty"` IfInDiscards int64 `json:"IfInDiscards,omitempty"` IfInErrors int64 `json:"IfInErrors,omitempty"` IfInUnknownProtos int64 `json:"IfInUnknownProtos,omitempty"` IfOutOctets int64 `json:"IfOutOctets,omitempty"` IfOutUcastPkts int64 `json:"IfOutUcastPkts,omitempty"` IfOutMulticastPkts int64 `json:"IfOutMulticastPkts,omitempty"` IfOutBroadcastPkts int64 `json:"IfOutBroadcastPkts,omitempty"` IfOutDiscards int64 `json:"IfOutDiscards,omitempty"` IfOutErrors int64 `json:"IfOutErrors,omitempty"` }
IfMetric the SFlow Interface counters easyjson:json gendecoder
func (*IfMetric) GetFieldBool ¶ added in v0.26.0
func (*IfMetric) GetFieldInt64 ¶ added in v0.26.0
func (*IfMetric) GetFieldKeys ¶ added in v0.26.0
func (*IfMetric) GetFieldString ¶ added in v0.26.0
func (IfMetric) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (IfMetric) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*IfMetric) MatchBool ¶ added in v0.26.0
func (obj *IfMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*IfMetric) MatchInt64 ¶ added in v0.26.0
func (obj *IfMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*IfMetric) MatchString ¶ added in v0.26.0
func (obj *IfMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*IfMetric) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*IfMetric) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type OvsMetric ¶ added in v0.23.0
type OvsMetric struct { OvsDpNHit int64 `json:"OvsDpNHit,omitempty"` OvsDpNMissed int64 `json:"OvsDpNMissed,omitempty"` OvsDpNLost int64 `json:"OvsDpNLost,omitempty"` OvsDpNMaskHit int64 `json:"OvsDpNMaskHit,omitempty"` OvsDpNFlows int64 `json:"OvsDpNFlows,omitempty"` OvsDpNMasks int64 `json:"OvsDpNMasks,omitempty"` OvsAppFdOpen int64 `json:"OvsAppFdOpen,omitempty"` OvsAppFdMax int64 `json:"OvsAppFdMax,omitempty"` OvsAppConnOpen int64 `json:"OvsAppConnOpen,omitempty"` OvsAppConnMax int64 `json:"OvsAppConnMax,omitempty"` OvsAppMemUsed int64 `json:"OvsAppMemUsed,omitempty"` OvsAppMemMax int64 `json:"OvsAppMemMax,omitempty"` }
OvsMetric the SFlow ovs counters easyjson:json gendecoder
func (*OvsMetric) GetFieldBool ¶ added in v0.26.0
func (*OvsMetric) GetFieldInt64 ¶ added in v0.26.0
func (*OvsMetric) GetFieldKeys ¶ added in v0.26.0
func (*OvsMetric) GetFieldString ¶ added in v0.26.0
func (OvsMetric) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (OvsMetric) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*OvsMetric) MatchBool ¶ added in v0.26.0
func (obj *OvsMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*OvsMetric) MatchInt64 ¶ added in v0.26.0
func (obj *OvsMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*OvsMetric) MatchString ¶ added in v0.26.0
func (obj *OvsMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*OvsMetric) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*OvsMetric) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type SFMetric ¶ added in v0.22.0
type SFMetric struct { IfMetric OvsMetric VlanMetric EthMetric Start int64 `json:"Start,omitempty"` Last int64 `json:"Last,omitempty"` }
SFMetric the SFlow Counter Samples easyjson:json gendecoder
func (*SFMetric) GetFieldBool ¶ added in v0.26.0
func (*SFMetric) GetFieldInt64 ¶ added in v0.22.0
func (*SFMetric) GetFieldKeys ¶ added in v0.22.0
func (*SFMetric) GetFieldString ¶ added in v0.22.0
func (SFMetric) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (SFMetric) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*SFMetric) MatchBool ¶ added in v0.26.0
func (obj *SFMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*SFMetric) MatchInt64 ¶ added in v0.26.0
func (obj *SFMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*SFMetric) MatchString ¶ added in v0.26.0
func (obj *SFMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*SFMetric) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SFMetric) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type SFlow ¶ added in v0.22.0
type SFlow struct { IfMetrics map[int64]*IfMetric `json:"IfMetrics,omitempty"` Metric *SFMetric `json:"Metric,omitempty"` LastUpdateMetric *SFMetric `json:"LastUpdateMetric,omitempty"` }
SFlow all sflow information easyjson:json gendecoder
func (*SFlow) GetFieldBool ¶ added in v0.26.0
func (*SFlow) GetFieldInt64 ¶ added in v0.22.0
func (*SFlow) GetFieldKeys ¶ added in v0.22.0
func (*SFlow) GetFieldString ¶ added in v0.22.0
func (SFlow) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (SFlow) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*SFlow) MatchBool ¶ added in v0.26.0
func (obj *SFlow) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*SFlow) MatchInt64 ¶ added in v0.26.0
func (obj *SFlow) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*SFlow) MatchString ¶ added in v0.26.0
func (obj *SFlow) MatchString(key string, predicate getter.StringPredicate) bool
func (*SFlow) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SFlow) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type VlanMetric ¶ added in v0.23.0
type VlanMetric struct { VlanOctets int64 `json:"VlanOctets,omitempty"` VlanUcastPkts int64 `json:"VlanUcastPkts,omitempty"` VlanMulticastPkts int64 `json:"VlanMulticastPkts,omitempty"` VlanBroadcastPkts int64 `json:"VlanBroadcastPkts,omitempty"` VlanDiscards int64 `json:"VlanDiscards,omitempty"` }
VlanMetric the SFlow vlan counters easyjson:json gendecoder
func (*VlanMetric) GetField ¶ added in v0.26.0
func (obj *VlanMetric) GetField(key string) (interface{}, error)
func (*VlanMetric) GetFieldBool ¶ added in v0.26.0
func (obj *VlanMetric) GetFieldBool(key string) (bool, error)
func (*VlanMetric) GetFieldInt64 ¶ added in v0.26.0
func (obj *VlanMetric) GetFieldInt64(key string) (int64, error)
func (*VlanMetric) GetFieldKeys ¶ added in v0.26.0
func (obj *VlanMetric) GetFieldKeys() []string
func (*VlanMetric) GetFieldString ¶ added in v0.26.0
func (obj *VlanMetric) GetFieldString(key string) (string, error)
func (VlanMetric) MarshalEasyJSON ¶ added in v0.26.0
func (v VlanMetric) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (VlanMetric) MarshalJSON ¶ added in v0.26.0
func (v VlanMetric) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*VlanMetric) MatchBool ¶ added in v0.26.0
func (obj *VlanMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*VlanMetric) MatchInt64 ¶ added in v0.26.0
func (obj *VlanMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*VlanMetric) MatchString ¶ added in v0.26.0
func (obj *VlanMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*VlanMetric) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *VlanMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*VlanMetric) UnmarshalJSON ¶ added in v0.26.0
func (v *VlanMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface