Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAgentAlreadyAllocated error agent already allocated for this uuid ErrAgentAlreadyAllocated = errors.New("agent already allocated for this uuid") )
Functions ¶
This section is empty.
Types ¶
type SFlowAgent ¶
type SFlowAgent struct { common.RWMutex UUID string Addr string Port int FlowTable *flow.Table Conn *net.UDPConn BPFFilter string HeaderSize uint32 }
SFlowAgent describes SFlow agent probe
func NewSFlowAgent ¶
func NewSFlowAgent(u string, a *common.ServiceAddress, ft *flow.Table, bpfFilter string, headerSize uint32) *SFlowAgent
NewSFlowAgent creates a new sFlow agent which will populate the given flowtable
func (*SFlowAgent) GetTarget ¶
func (sfa *SFlowAgent) GetTarget() string
GetTarget returns the current used connection
type SFlowAgentAllocator ¶ added in v0.3.0
SFlowAgentAllocator describes an SFlow agent allocator to manage multiple SFlow agent probe
func NewSFlowAgentAllocator ¶ added in v0.3.0
func NewSFlowAgentAllocator() (*SFlowAgentAllocator, error)
NewSFlowAgentAllocator creates a new sFlow agent allocator
func (*SFlowAgentAllocator) Alloc ¶ added in v0.3.0
func (a *SFlowAgentAllocator) Alloc(uuid string, ft *flow.Table, bpfFilter string, headerSize uint32, addr *common.ServiceAddress) (agent *SFlowAgent, _ error)
Alloc allocates a new sFlow agent
func (*SFlowAgentAllocator) Release ¶ added in v0.3.0
func (a *SFlowAgentAllocator) Release(uuid string)
Release a sFlow agent
func (*SFlowAgentAllocator) ReleaseAll ¶ added in v0.3.0
func (a *SFlowAgentAllocator) ReleaseAll()
ReleaseAll sFlow agents
Click to show internal directories.
Click to hide internal directories.