parse

package
v0.0.0-...-b76d872 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPRecords

func IPRecords(file io.Reader) (record.IPs, error)

IPRecords parses data from JSON format to IPs.

func StorageRecords

func StorageRecords(file io.Reader) (record.Storages, error)

StorageRecords parses data from XML format to storage record.

func VMRecords

func VMRecords(file io.Reader) (record.VMs, error)

VMRecords parses data from template to vm/server record.

Types

type Parser

type Parser struct {
	EventChan  chan fsnotify.Event
	RecordChan chan record.Record
}

Parser structure with event channel for incoming events and record channel for parsed records.

func SetParser

func SetParser(eventChan chan fsnotify.Event, recordChan chan record.Record) *Parser

SetParser sets event and record channels to parser.

func (Parser) Parse

func (p Parser) Parse()

Parse takes event from channel, parses content and put to record channel to export to Prometheus.

Jump to

Keyboard shortcuts

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