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 Agent ¶
type Agent struct { insanelock.RWMutex UUID string Addr string Port int FlowTable *flow.Table Conn *net.UDPConn UUIDs flow.UUIDs }
Agent describes NetFlow agent probe
func NewAgent ¶
func NewAgent(u string, conn *net.UDPConn, addr string, port int, ft *flow.Table, uuids flow.UUIDs) *Agent
NewAgent creates a new NetFlow agent which will populate the given flowtable
type AgentAllocator ¶
type AgentAllocator struct { insanelock.RWMutex // contains filtered or unexported fields }
AgentAllocator describes an NetFlow agent allocator to manage multiple NetFlow agent probe
func NewAgentAllocator ¶
func NewAgentAllocator() (*AgentAllocator, error)
NewAgentAllocator creates a new netflow agent allocator
func (*AgentAllocator) Alloc ¶
func (a *AgentAllocator) Alloc(uuid string, ft *flow.Table, addr *service.Address, uuids flow.UUIDs) (agent *Agent, _ error)
Alloc allocates a new netflow agent
func (*AgentAllocator) Release ¶
func (a *AgentAllocator) Release(uuid string)
Release a netflow agent
Click to show internal directories.
Click to hide internal directories.