dendrite: github.com/omc/dendrite Index | Files

package dendrite

import "github.com/omc/dendrite"

Index

Package Files

config.go destination.go encoder.go io.go parser.go tail.go tail_group.go util.go

Constants

const (
    String = iota
    Integer
    Double
    Timestamp
)
const (
    Simple = iota
    Tokens
    Hash
    Gauge
    Metric
    Counter
)

Variables

var DefaultPattern = "(?P<line>.*?)\r?\n"
var EmptyReader = new(noOpReader)

func NewAnyReader Uses

func NewAnyReader(r []io.Reader) io.Reader

func NewFileReadWriter Uses

func NewFileReadWriter(path string) (io.ReadWriteCloser, error)

func NewReadWriter Uses

func NewReadWriter(u *url.URL) (io.ReadWriteCloser, error)

func NewTCPReadWriter Uses

func NewTCPReadWriter(u *url.URL) (io.ReadWriteCloser, error)

func NewUDPReadWriter Uses

func NewUDPReadWriter(u *url.URL) (io.ReadWriteCloser, error)

func RecursiveMergeNoConflict Uses

func RecursiveMergeNoConflict(a map[string]interface{}, b map[string]interface{}, path string) error

func Unescape Uses

func Unescape(in string) string

func YamlUnmarshal Uses

func YamlUnmarshal(node yaml.Node) interface{}

type Column Uses

type Column struct {
    Type      FieldType
    Treatment FieldTreatment
    Value     interface{}
}

type Config Uses

type Config struct {
    OffsetDir        string
    MaxBackfillBytes int64
    MaxLineSizeBytes int64
    Destinations     []DestinationConfig
    Sources          []SourceConfig
}

func NewConfig Uses

func NewConfig(configFile string, hostname string) (*Config, error)

Mostly delegate

func (*Config) CreateAllTailGroups Uses

func (config *Config) CreateAllTailGroups(drain chan Record) TailGroups

func (*Config) CreateDestinations Uses

func (config *Config) CreateDestinations() Destinations

type Destination Uses

type Destination struct {
    Encoder Encoder
    RW      io.ReadWriter
}

func NewDestination Uses

func NewDestination(config DestinationConfig) (*Destination, error)

type DestinationConfig Uses

type DestinationConfig struct {
    Name string
    Url  *url.URL
}

type Destinations Uses

type Destinations []*Destination

func NewDestinations Uses

func NewDestinations() Destinations

func (*Destinations) Consume Uses

func (dests *Destinations) Consume(ch chan Record, finished chan bool)

func (*Destinations) Reader Uses

func (dests *Destinations) Reader() io.Reader

type Encoder Uses

type Encoder interface {
    Encode(out map[string]Column, writer io.Writer)
}

func NewEncoder Uses

func NewEncoder(u *url.URL) (Encoder, error)

type FieldConfig Uses

type FieldConfig struct {
    Name      string
    Alias     string
    Type      FieldType
    Treatment FieldTreatment
    Group     int
    Format    string
    Pattern   *regexp.Regexp
    Salt      string
}

type FieldTreatment Uses

type FieldTreatment int

type FieldType Uses

type FieldType int

type JsonEncoder Uses

type JsonEncoder struct{}

func (*JsonEncoder) Encode Uses

func (*JsonEncoder) Encode(out map[string]Column, writer io.Writer)

type Parser Uses

type Parser interface {
    Consume(bytes []byte, counter *int64)
}

func NewRegexpParser Uses

func NewRegexpParser(hostname string, group string, file string, output chan Record, pattern string, fields []FieldConfig, maxLineSize int64) Parser

type RawStringEncoder Uses

type RawStringEncoder struct{}

func (*RawStringEncoder) Encode Uses

func (*RawStringEncoder) Encode(out map[string]Column, writer io.Writer)

type Record Uses

type Record map[string]Column

type RegexpParser Uses

type RegexpParser struct {
    // contains filtered or unexported fields
}

func (*RegexpParser) Consume Uses

func (parser *RegexpParser) Consume(bytes []byte, counter *int64)

type SourceConfig Uses

type SourceConfig struct {
    Glob             string
    Pattern          string
    Fields           []FieldConfig
    Name             string
    OffsetDir        string
    Hostname         string
    MaxBackfillBytes int64
    MaxLineSizeBytes int64
}

type StatsdEncoder Uses

type StatsdEncoder struct{}

func (*StatsdEncoder) Encode Uses

func (*StatsdEncoder) Encode(out map[string]Column, writer io.Writer)

type SystemTimeProvider Uses

type SystemTimeProvider struct{}

func (*SystemTimeProvider) Now Uses

func (*SystemTimeProvider) Now() time.Time

type Tail Uses

type Tail struct {
    Path       string
    OffsetPath string
    Watcher    watch.FileWatcher
    Parser     Parser
    // contains filtered or unexported fields
}

func NewTail Uses

func NewTail(parser Parser, maxBackfill int64, path string, offsetPath string, offset int64) *Tail

func (*Tail) Close Uses

func (tail *Tail) Close()

func (*Tail) LoadOffset Uses

func (tail *Tail) LoadOffset()

func (*Tail) Offset Uses

func (tail *Tail) Offset() int64

func (*Tail) Poll Uses

func (tail *Tail) Poll()

func (*Tail) SetOffset Uses

func (tail *Tail) SetOffset(o int64)

func (*Tail) StartWatching Uses

func (tail *Tail) StartWatching()

func (*Tail) Stat Uses

func (tail *Tail) Stat() (fi os.FileInfo, err error)

func (*Tail) WriteOffset Uses

func (tail *Tail) WriteOffset()

type TailGroup Uses

type TailGroup struct {
    Glob      string
    Pattern   string
    OffsetDir string
    Name      string
    Hostname  string
    Tails     map[string]*Tail
    // contains filtered or unexported fields
}

func NewTailGroup Uses

func NewTailGroup(config SourceConfig, output chan Record) *TailGroup

func (*TailGroup) NewParser Uses

func (group *TailGroup) NewParser(file string) Parser

func (*TailGroup) Poll Uses

func (group *TailGroup) Poll()

func (*TailGroup) Refresh Uses

func (group *TailGroup) Refresh()

type TailGroups Uses

type TailGroups []*TailGroup

func (*TailGroups) Loop Uses

func (groups *TailGroups) Loop()

func (*TailGroups) Poll Uses

func (groups *TailGroups) Poll()

func (*TailGroups) Refresh Uses

func (groups *TailGroups) Refresh()

type TimeProvider Uses

type TimeProvider interface {
    Now() time.Time
}
var StandardTimeProvider TimeProvider = new(SystemTimeProvider)

Package dendrite imports 20 packages (graph). Updated 2016-08-02. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).