telegraf: Index | Files

package csv

import ""


Package Files


type Parser Uses

type Parser struct {
    MetricName        string
    HeaderRowCount    int
    SkipRows          int
    SkipColumns       int
    Delimiter         string
    Comment           string
    TrimSpace         bool
    ColumnNames       []string
    ColumnTypes       []string
    TagColumns        []string
    MeasurementColumn string
    TimestampColumn   string
    TimestampFormat   string
    DefaultTags       map[string]string
    TimeFunc          func() time.Time

func (*Parser) Parse Uses

func (p *Parser) Parse(buf []byte) ([]telegraf.Metric, error)

func (*Parser) ParseLine Uses

func (p *Parser) ParseLine(line string) (telegraf.Metric, error)

ParseLine does not use any information in header and assumes DataColumns is set it will also not skip any rows

func (*Parser) SetDefaultTags Uses

func (p *Parser) SetDefaultTags(tags map[string]string)

SetDefaultTags set the DefaultTags

func (*Parser) SetTimeFunc Uses

func (p *Parser) SetTimeFunc(fn TimeFunc)

type TimeFunc Uses

type TimeFunc func() time.Time

Package csv imports 9 packages (graph) and is imported by 4 packages. Updated 2020-03-23. Refresh now. Tools for package owners.