event_date_string

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateString

type DateString struct {
	Tags      []string `mapstructure:"tag-names,omitempty" json:"tag-names,omitempty"`
	Values    []string `mapstructure:"value-names,omitempty" json:"value-names,omitempty"`
	Precision string   `mapstructure:"precision,omitempty" json:"precision,omitempty"`
	Format    string   `mapstructure:"format,omitempty" json:"format,omitempty"`
	Location  string   `mapstructure:"location,omitempty" json:"location,omitempty"`
	Debug     bool     `mapstructure:"debug,omitempty" json:"debug,omitempty"`
	// contains filtered or unexported fields
}

DateString converts Tags and/or Values of unix timestamp to a human readable format. Precision specifies the unit of the received timestamp, s, ms, us or ns. DateTimeFormat is the desired datetime format, it defaults to RFC3339

func (*DateString) Apply

func (d *DateString) Apply(es ...*formatters.EventMsg) []*formatters.EventMsg

func (*DateString) Init

func (d *DateString) Init(cfg interface{}, opts ...formatters.Option) error

func (*DateString) WithActions added in v0.21.0

func (d *DateString) WithActions(act map[string]map[string]interface{})

func (*DateString) WithLogger added in v0.9.1

func (d *DateString) WithLogger(l *log.Logger)

func (*DateString) WithTargets added in v0.12.2

func (d *DateString) WithTargets(tcs map[string]*types.TargetConfig)

Jump to

Keyboard shortcuts

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