flags

package
v0.0.0-...-fe70aa2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(opts *Options) error

Parse parses flags into give Option

Types

type Field

type Field struct {
	Field, Row string
	FieldType  FieldType
}

Field describes an InfluxDB field tag.

func (*Field) MarshalFlag

func (f *Field) MarshalFlag() (string, error)

MarshalFlag is the go-flags Value MarshalFlag implementation for Field

func (*Field) UnmarshalFlag

func (f *Field) UnmarshalFlag(arg string) error

UnmarshalFlag is the go-flags Value UnmarshalFlag implementation for Field

type FieldType

type FieldType string

FieldType describes an InfluxDB field type. Field values can be floats, integers, strings, or Booleans.

const (
	FieldTypeFloat   FieldType = "float"
	FieldTypeInteger FieldType = "int"
	FieldTypeString  FieldType = "string"
	FieldTypeBool    FieldType = "bool"
)

All InfluxDB field types

type Options

type Options struct {
	Region          string        `long:"region" description:"The AWS region." required:"true"`
	Bucket          string        `long:"bucket" description:"The AWS bucket to watch." required:"true"`
	Prefix          string        `long:"prefix" description:"The bucket prefix."`
	Suffix          string        `long:"suffix" description:"Filename suffix to limit files read on the bucket."`
	CleanObjects    bool          `long:"clean-objects" description:"Whether to delete S3 objects after processing them."`
	Timeout         time.Duration `long:"timeout" description:"The global timeout." default:"30s"`
	InfluxServers   []string      `long:"influx-server" description:"The InfluxDB servers addresses." required:"true"`
	InfluxToken     string        `long:"influx-token" description:"The InfluxDB token." required:"true"`
	InfluxOrg       string        `long:"influx-org" description:"The InfluxDB org to write to." required:"true"`
	InfluxBucket    string        `long:"influx-bucket" description:"The InfluxDB bucket write to." required:"true"`
	Measurement     string        `` /* 165-byte string literal not displayed */
	TimestampRow    string        `long:"timestamp-row" description:"The timestamp row in CSV." default:"timestamp"`
	TimestampLayout string        `long:"timestamp-layout" description:"The layout to parse timestamp." default:"2006-01-02T15:04:05.000Z"`
	Tags            []*Tag        `` /* 155-byte string literal not displayed */
	Fields          []*Field      `` /* 200-byte string literal not displayed */
}

Options wraps all flags

type Tag

type Tag struct {
	Tag, Row string
}

Tag describes an InfluxDB tag flag

func (*Tag) MarshalFlag

func (t *Tag) MarshalFlag() (string, error)

MarshalFlag is the go-flags Value MarshalFlag implementation for Tag

func (*Tag) UnmarshalFlag

func (t *Tag) UnmarshalFlag(arg string) error

UnmarshalFlag is the go-flags Value UnmarshalFlag implementation for Tag

Jump to

Keyboard shortcuts

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