exporter

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExporterInput added in v0.4.0

type ExporterInput struct {
	// CollectorAddress needs to be provided in hostIP:port format.
	CollectorAddress string
	// CollectorProtocol needs to be provided in lower case format.
	// We support "tcp" and "udp" protocols.
	CollectorProtocol   string
	ObservationDomainID uint32
	TempRefTimeout      uint32
	PathMTU             int
	IsEncrypted         bool
	CACert              []byte
	ClientCert          []byte
	ClientKey           []byte
	IsIPv6              bool
}

type ExportingProcess

type ExportingProcess struct {
	// contains filtered or unexported fields
}
  1. Tested one exportingProcess process per exporter. Can support multiple collector scenario by creating different instances of exporting process. Need to be tested
  2. Only one observation point per observation domain is supported, so observation point ID not defined.
  3. Supports only TCP and UDP; one session at a time. SCTP is not supported.

TODO:UDP needs to send MTU size packets as per RFC7011

func InitExportingProcess

func InitExportingProcess(input ExporterInput) (*ExportingProcess, error)

InitExportingProcess takes in collector address(net.Addr format), obsID(observation ID) and tempRefTimeout(template refresh timeout). tempRefTimeout is applicable only for collectors listening over UDP; unit is seconds. For TCP, you can pass any value. For UDP, if 0 is passed, consider 1800s as default.

PathMTU is recommended for UDP transport. If not given a valid value, i.e., either 0 or a value more than 1500, we consider a default value of 512B as per RFC7011. PathMTU is optional for TCP as we use max socket buffer size of 65535. It can be provided as 0.

func (*ExportingProcess) CloseConnToCollector

func (ep *ExportingProcess) CloseConnToCollector()

func (*ExportingProcess) GetMsgSizeLimit added in v0.4.2

func (ep *ExportingProcess) GetMsgSizeLimit() int

func (*ExportingProcess) NewTemplateID

func (ep *ExportingProcess) NewTemplateID() uint16

NewTemplateID is called to get ID when creating new template record.

func (*ExportingProcess) SendSet added in v0.4.0

func (ep *ExportingProcess) SendSet(set entities.Set) (int, error)

Jump to

Keyboard shortcuts

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