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 SendJSONRecord bool JSONBufferLen int CheckConnInterval time.Duration }
type ExportingProcess ¶
type ExportingProcess struct {
// contains filtered or unexported fields
}
- Tested one exportingProcess process per exporter. Can support multiple collector scenario by creating different instances of exporting process. Need to be tested
- Only one observation point per observation domain is supported, so observation point ID not defined.
- 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. JSONBufferLen is recommended for sending json record. If not given a valid value, we consider a default 5000B.
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.