sflow

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 10 Imported by: 8

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

func (*SFlowAgent) Start

func (sfa *SFlowAgent) Start()

Start the SFlow probe agent

func (*SFlowAgent) Stop

func (sfa *SFlowAgent) Stop()

Stop the SFlow probe agent

type SFlowAgentAllocator added in v0.3.0

type SFlowAgentAllocator struct {
	common.RWMutex
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

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