sflow

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

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 added in v0.21.0

type Agent struct {
	common.RWMutex
	UUID       string
	Addr       string
	Port       int
	FlowTable  *flow.Table
	Conn       *net.UDPConn
	BPFFilter  string
	HeaderSize uint32
}

Agent describes SFlow agent probe

func NewAgent added in v0.21.0

func NewAgent(u string, a *common.ServiceAddress, ft *flow.Table, bpfFilter string, headerSize uint32) *Agent

NewAgent creates a new sFlow agent which will populate the given flowtable

func (*Agent) GetTarget added in v0.21.0

func (sfa *Agent) GetTarget() string

GetTarget returns the current used connection

func (*Agent) Start added in v0.21.0

func (sfa *Agent) Start()

Start the SFlow probe agent

func (*Agent) Stop added in v0.21.0

func (sfa *Agent) Stop()

Stop the SFlow probe agent

type AgentAllocator added in v0.21.0

type AgentAllocator struct {
	common.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 *common.ServiceAddress) (agent *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

Source Files

  • agent.go

Jump to

Keyboard shortcuts

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