Documentation ¶
Index ¶
- Constants
- Variables
- func NewAnyReader(r []io.Reader) io.Reader
- func NewFileReadWriter(path string) (io.ReadWriteCloser, error)
- func NewReadWriter(u *url.URL) (io.ReadWriteCloser, error)
- func NewTCPReadWriter(u *url.URL) (io.ReadWriteCloser, error)
- func NewUDPReadWriter(u *url.URL) (io.ReadWriteCloser, error)
- func RecursiveMergeNoConflict(a map[string]interface{}, b map[string]interface{}, path string) error
- func Unescape(in string) string
- func YamlUnmarshal(node yaml.Node) interface{}
- type Column
- type Config
- type Destination
- type DestinationConfig
- type Destinations
- type Encoder
- type FieldConfig
- type FieldTreatment
- type FieldType
- type JsonEncoder
- type Parser
- type RawStringEncoder
- type Record
- type RegexpParser
- type SourceConfig
- type StatsdEncoder
- type SystemTimeProvider
- type Tail
- type TailGroup
- type TailGroups
- type TimeProvider
Constants ¶
View Source
const ( String = iota Integer Double Timestamp )
View Source
const ( Simple = iota Tokens Hash Gauge Metric Counter )
Variables ¶
View Source
var DefaultPattern = "(?P<line>.*?)\r?\n"
View Source
var EmptyReader = new(noOpReader)
Functions ¶
func NewFileReadWriter ¶
func NewFileReadWriter(path string) (io.ReadWriteCloser, error)
func NewReadWriter ¶
func NewReadWriter(u *url.URL) (io.ReadWriteCloser, error)
func NewTCPReadWriter ¶
func NewTCPReadWriter(u *url.URL) (io.ReadWriteCloser, error)
func NewUDPReadWriter ¶
func NewUDPReadWriter(u *url.URL) (io.ReadWriteCloser, error)
func YamlUnmarshal ¶
Types ¶
type Column ¶
type Column struct { Type FieldType Treatment FieldTreatment Value interface{} }
type Config ¶
type Config struct { OffsetDir string MaxBackfillBytes int64 MaxLineSizeBytes int64 Destinations []DestinationConfig Sources []SourceConfig }
func (*Config) CreateAllTailGroups ¶
func (config *Config) CreateAllTailGroups(drain chan Record) TailGroups
func (*Config) CreateDestinations ¶
func (config *Config) CreateDestinations() Destinations
type Destination ¶
type Destination struct { Encoder Encoder RW io.ReadWriter }
func NewDestination ¶
func NewDestination(config DestinationConfig) (*Destination, error)
type DestinationConfig ¶
type Destinations ¶
type Destinations []*Destination
func NewDestinations ¶
func NewDestinations() Destinations
func (*Destinations) Consume ¶
func (dests *Destinations) Consume(ch chan Record, finished chan bool)
func (*Destinations) Reader ¶
func (dests *Destinations) Reader() io.Reader
type FieldConfig ¶
type FieldTreatment ¶
type FieldTreatment int
type JsonEncoder ¶
type JsonEncoder struct{}
type Parser ¶
func NewRegexpParser ¶
type RawStringEncoder ¶
type RawStringEncoder struct{}
type RegexpParser ¶
type RegexpParser struct {
// contains filtered or unexported fields
}
func (*RegexpParser) Consume ¶
func (parser *RegexpParser) Consume(bytes []byte, counter *int64)
type SourceConfig ¶
type StatsdEncoder ¶
type StatsdEncoder struct{}
type SystemTimeProvider ¶
type SystemTimeProvider struct{}
func (*SystemTimeProvider) Now ¶
func (*SystemTimeProvider) Now() time.Time
type Tail ¶
type Tail struct { Path string OffsetPath string Watcher watch.FileWatcher Parser Parser // contains filtered or unexported fields }
func (*Tail) LoadOffset ¶
func (tail *Tail) LoadOffset()
func (*Tail) StartWatching ¶
func (tail *Tail) StartWatching()
func (*Tail) WriteOffset ¶
func (tail *Tail) WriteOffset()
type TailGroup ¶
type TailGroup struct { Glob string Pattern string OffsetDir string Name string Hostname string Tails map[string]*Tail // contains filtered or unexported fields }
func NewTailGroup ¶
func NewTailGroup(config SourceConfig, output chan Record) *TailGroup
type TailGroups ¶
type TailGroups []*TailGroup
func (*TailGroups) Loop ¶
func (groups *TailGroups) Loop()
func (*TailGroups) Poll ¶
func (groups *TailGroups) Poll()
func (*TailGroups) Refresh ¶
func (groups *TailGroups) Refresh()
type TimeProvider ¶
var StandardTimeProvider TimeProvider = new(SystemTimeProvider)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.