exporter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 session; SCTP and UDP is not supported.

TODO:UDP needs to send MTU size packets as per RFC7011 TODO: Add function to send multiple records simultaneously

func InitExportingProcess

func InitExportingProcess(collectorAddr net.Addr, obsID uint32, tempRefTimeout uint32) (*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. TODO: Get obsID, tempRefTimeout as args which can be of dynamic size supporting both TCP and UDP.

func (*ExportingProcess) AddRecordAndSendMsg

func (ep *ExportingProcess) AddRecordAndSendMsg(recType entities.ContentType, rec entities.Record) (int, error)

func (*ExportingProcess) CloseConnToCollector

func (ep *ExportingProcess) CloseConnToCollector()

func (*ExportingProcess) NewTemplateID

func (ep *ExportingProcess) NewTemplateID() uint16

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

Jump to

Keyboard shortcuts

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