Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataService ¶
type DataService interface {
Find(req core.Request) ([]core.LogEntry, error)
LastPublished() (entry core.LogEntry, err error)
}
DataService is accessor to store
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger contains writers for containers and merged writer for all sources
func NewFileLogger ¶
func NewFileLogger(wrf WritersFactory, m io.Writer) *FileLogger
NewFileLogger creates FileLogger for provided WritersFactory (per host/container) and merged writer
type FileWriter ¶
FileWriter writes entry to all log files
type Forwarder ¶
type Forwarder struct {
Publisher Publisher
Syslog SyslogBackgroundReader
FileWriter FileWriter
}
Forwarder tails syslog messages, parses entries and pushes to Publisher (store) and file logger(s)
type Mongo ¶
type Mongo struct {
*mdrv.Client
MongoParams
// contains filtered or unexported fields
}
Mongo store provides all mongo-related ops
func NewMongo ¶
func NewMongo(client *mdrv.Client, params MongoParams) (res *Mongo, err error)
NewMongo makes Mongo accessor
func (*Mongo) LastPublished ¶
LastPublished returns latest published entry
type MongoParams ¶
type MongoParams struct {
MaxDocs int
MaxCollectionSize int
Delay time.Duration
DBName, Collection string
}
MongoParams has all inputs (except dial info) needed to initialize mongo store
type Publisher ¶
type Publisher interface {
Publish(records []core.LogEntry) (err error)
LastPublished() (entry core.LogEntry, err error)
}
Publisher to store
type RestServer ¶
type RestServer struct {
Port int
DataService DataService
Limit int // request limit, i.e. max number of records any single Find can return
Version string
StreamDuration time.Duration
}
RestServer is a basic rest server to access msgs from DataService
type Syslog ¶
type Syslog struct {
Port int
// contains filtered or unexported fields
}
Syslog server on TCP & UDP 5514. Should be mapped to 514 in compose
type SyslogBackgroundReader ¶
SyslogBackgroundReader provides aysnc runner returning the channel for incoming messages
type WritersFactory ¶
WritersFactory is a type for func returning io.Writer for given host and container