Documentation ¶
Index ¶
- Constants
- Variables
- func BuildRegexpFromGlobPattern(pattern string) (string, error)
- func Glob(fs http.FileSystem, pattern string) ([]string, error)
- func NewEngine(logger Logger, opener Opener, ...) *engineImpl
- func NewRandSourceWithTimestampSeed() rand.Source
- func ParseCapacityString(s string) (int64, error)
- type Config
- type ConfigElement
- type ContinueType
- type DefaultLineReader
- type DefaultOpener
- type Disposable
- type Engine
- type Fanout
- type FluentConfigurer
- type FluentRecord
- type FluentRecordSet
- type FluentRouter
- type Input
- type InputFactory
- type InputFactoryRegistry
- type IntVector
- type Journal
- type JournalChunk
- type JournalChunkListener
- type JournalGroup
- type JournalGroupFactory
- type LineParser
- type LineParserFactory
- type LineParserFactoryFactory
- type LineParserPlugin
- type LineParserPluginRegistry
- type LineReader
- type Logger
- type Markup
- type MarkupAttributes
- type MarkupChunk
- type NotFoundType
- type Opener
- type Output
- type OutputFactory
- type OutputFactoryRegistry
- type Panicked
- type PatternError
- type Plugin
- type PluginInstance
- type PluginRegistry
- type Port
- type RecordPacker
- type RecordPump
- type ScoreValueFetcher
- type Scoreboard
- type ScoreboardFactory
- type Scorekeeper
- type ScorekeeperTopic
- type Slicer
- type SlicerNewKeyEventListener
- type Spawnee
- type SpawneeStatus
- type Spawner
- func (spawner *Spawner) GetRunningSpawnees() ([]Spawnee, error)
- func (spawner *Spawner) GetSpawneeStatuses() ([]SpawneeStatus, error)
- func (spawner *Spawner) GetStatus(spawnee Spawnee) error
- func (spawner *Spawner) GetStoppedSpawnees() ([]Spawnee, error)
- func (spawner *Spawner) Kill(spawnee Spawnee) (bool, error)
- func (spawner *Spawner) Poll(spawnee Spawnee) error
- func (spawner *Spawner) PollMultiple(spawnees []Spawnee) error
- func (spawner *Spawner) Spawn(spawnee Spawnee) error
- type StringVector
- type TinyFluentRecord
Constants ¶
View Source
const ( Red = 0x00001 Green = 0x00002 Yellow = 0x00003 Blue = 0x00004 Magenta = 0x00005 Cyan = 0x00006 White = 0x00007 Embolden = 0x10000 Underlined = 0x20000 )
View Source
const ( Spawned = 1 Stopped = 2 )
Variables ¶
View Source
var Continue = &ContinueType{}
View Source
var NotFound = &NotFoundType{}
Functions ¶
func NewEngine ¶
func NewEngine(logger Logger, opener Opener, lineParserPluginRegistry LineParserPluginRegistry, scorekeeper *Scorekeeper, defaultPort Port) *engineImpl
func ParseCapacityString ¶
Types ¶
type Config ¶
type Config struct {
Root *ConfigElement
}
type ConfigElement ¶
type ConfigElement struct { Name string Args string Attrs map[string]string Elems []*ConfigElement }
type ContinueType ¶
type ContinueType struct{}
func (*ContinueType) Error ¶
func (_ *ContinueType) Error() string
type DefaultLineReader ¶
type DefaultLineReader struct {
// contains filtered or unexported fields
}
func NewDefaultLineReader ¶
func NewDefaultLineReader(filename string, reader io.Reader) *DefaultLineReader
func (*DefaultLineReader) Close ¶
func (reader *DefaultLineReader) Close() error
func (*DefaultLineReader) Filename ¶
func (reader *DefaultLineReader) Filename() string
func (*DefaultLineReader) LineNumber ¶
func (reader *DefaultLineReader) LineNumber() int
func (*DefaultLineReader) Next ¶
func (reader *DefaultLineReader) Next() (string, error)
type DefaultOpener ¶
func (DefaultOpener) BasePath ¶
func (opener DefaultOpener) BasePath() string
func (DefaultOpener) FileSystem ¶
func (opener DefaultOpener) FileSystem() http.FileSystem
func (DefaultOpener) NewOpener ¶
func (opener DefaultOpener) NewOpener(path_ string) Opener
type Disposable ¶
type Disposable interface {
Dispose() error
}
type Engine ¶
type Engine interface { Disposable Logger() Logger Opener() Opener LineParserPluginRegistry() LineParserPluginRegistry RandSource() rand.Source Scorekeeper() *Scorekeeper DefaultPort() Port Spawn(Spawnee) error Launch(PluginInstance) error SpawneeStatuses() ([]SpawneeStatus, error) PluginInstances() []PluginInstance RecurringTaskScheduler() *task.RecurringTaskScheduler }
type Fanout ¶
type Fanout struct {
// contains filtered or unexported fields
}
func (*Fanout) Emit ¶
func (fanout *Fanout) Emit(recordSets []FluentRecordSet) error
type FluentConfigurer ¶
type FluentConfigurer struct {
// contains filtered or unexported fields
}
func NewFluentConfigurer ¶
func NewFluentConfigurer(logger Logger, inputFactoryRegistry InputFactoryRegistry, outputFactoryRegistry OutputFactoryRegistry, router *FluentRouter) *FluentConfigurer
type FluentRecord ¶
type FluentRecordSet ¶
type FluentRecordSet struct { Tag string Records []TinyFluentRecord }
type FluentRouter ¶
type FluentRouter struct {
// contains filtered or unexported fields
}
func NewFluentRouter ¶
func NewFluentRouter() *FluentRouter
func (*FluentRouter) Emit ¶
func (router *FluentRouter) Emit(recordSets []FluentRecordSet) error
type Input ¶
type Input interface { PluginInstance Port() Port }
type InputFactory ¶
type InputFactory interface { Plugin New(engine Engine, config *ConfigElement) (Input, error) }
type InputFactoryRegistry ¶
type InputFactoryRegistry interface { RegisterInputFactory(factory InputFactory) error LookupInputFactory(name string) InputFactory }
type Journal ¶
type Journal interface { Disposable Key() string Write(data []byte) error GetTailChunk() JournalChunk AddNewChunkListener(JournalChunkListener) AddFlushListener(JournalChunkListener) Flush(func(JournalChunk) error) error }
type JournalChunk ¶
type JournalChunk interface { Disposable GetReader() (io.Reader, error) GetNextChunk() JournalChunk TakeOwnership() bool }
type JournalChunkListener ¶
type JournalChunkListener func(JournalChunk) error
type JournalGroup ¶
type JournalGroup interface { Disposable GetJournal(key string) Journal GetJournalKeys() []string }
type JournalGroupFactory ¶
type JournalGroupFactory interface {
GetJournalGroup() JournalGroup
}
type LineParser ¶
type LineParserFactory ¶
type LineParserFactory interface {
New(receiver func(FluentRecord) error) (LineParser, error)
}
type LineParserFactoryFactory ¶
type LineParserFactoryFactory func(engine Engine, config *ConfigElement) (LineParserFactory, error)
type LineParserPlugin ¶
type LineParserPlugin interface { Name() string OnRegistering(func(name string, factory LineParserFactoryFactory) error) error }
type LineParserPluginRegistry ¶
type LineParserPluginRegistry interface { RegisterLineParserPlugin(plugin LineParserPlugin) error LookupLineParserFactoryFactory(name string) LineParserFactoryFactory }
type LineReader ¶
type LineReader interface { Next() (string, error) Close() error Filename() string LineNumber() int }
func NewLineReader ¶
func NewLineReader(opener Opener, filename string) (LineReader, error)
type Markup ¶
type Markup struct {
Chunks []MarkupChunk
}
type MarkupAttributes ¶
type MarkupAttributes int
type MarkupChunk ¶
type MarkupChunk struct { Attrs MarkupAttributes Text string }
type NotFoundType ¶
type NotFoundType struct{}
func (*NotFoundType) Error ¶
func (_ *NotFoundType) Error() string
type Opener ¶
type Opener interface { FileSystem() http.FileSystem BasePath() string NewOpener(path string) Opener }
type Output ¶
type Output interface { PluginInstance Port }
type OutputFactory ¶
type OutputFactory interface { Plugin New(engine Engine, config *ConfigElement) (Output, error) }
type OutputFactoryRegistry ¶
type OutputFactoryRegistry interface { RegisterOutputFactory(factory OutputFactory) error LookupOutputFactory(name string) OutputFactory }
type PatternError ¶
type PatternError struct {
// contains filtered or unexported fields
}
func (*PatternError) Error ¶
func (self *PatternError) Error() string
type Plugin ¶
type Plugin interface { Name() string BindScorekeeper(*Scorekeeper) }
type PluginInstance ¶
type PluginRegistry ¶
type PluginRegistry interface {
Plugins() []Plugin
}
type Port ¶
type Port interface {
Emit(recordSets []FluentRecordSet) error
}
type RecordPacker ¶
type RecordPacker interface {
Pack(record FluentRecord) ([]byte, error)
}
type RecordPump ¶
type RecordPump struct {
// contains filtered or unexported fields
}
func NewRecordPump ¶
func NewRecordPump(port Port, backlog int) *RecordPump
func (*RecordPump) EmitOne ¶
func (pump *RecordPump) EmitOne(record FluentRecord)
func (*RecordPump) Port ¶
func (pump *RecordPump) Port() Port
func (*RecordPump) Run ¶
func (pump *RecordPump) Run() error
func (*RecordPump) Shutdown ¶
func (pump *RecordPump) Shutdown() error
type ScoreValueFetcher ¶
type ScoreValueFetcher interface { PlainText(PluginInstance) (string, error) Markup(PluginInstance) (Markup, error) }
type Scoreboard ¶
type Scoreboard interface { PluginInstance }
type ScoreboardFactory ¶
type ScoreboardFactory interface { Plugin New(engine Engine, pluginRegistry PluginRegistry, config *ConfigElement) (Scoreboard, error) }
type Scorekeeper ¶
type Scorekeeper struct {
// contains filtered or unexported fields
}
func NewScorekeeper ¶
func NewScorekeeper(logger Logger) *Scorekeeper
func (*Scorekeeper) AddTopic ¶
func (sk *Scorekeeper) AddTopic(topic ScorekeeperTopic)
func (*Scorekeeper) Dispose ¶
func (sk *Scorekeeper) Dispose()
func (*Scorekeeper) Fetch ¶
func (sk *Scorekeeper) Fetch(plugin Plugin, name string) (ScoreValueFetcher, error)
func (*Scorekeeper) GetPlugins ¶
func (sk *Scorekeeper) GetPlugins() []Plugin
func (*Scorekeeper) GetTopics ¶
func (sk *Scorekeeper) GetTopics(plugin Plugin) []ScorekeeperTopic
type ScorekeeperTopic ¶
type ScorekeeperTopic struct { Plugin Plugin Name string DisplayName string Description string Fetcher ScoreValueFetcher }
type Slicer ¶
type Slicer struct {
// contains filtered or unexported fields
}
func NewSlicer ¶
func NewSlicer(journalGroup JournalGroup, keyGetter func(record FluentRecord) string, packer RecordPacker, logger Logger) *Slicer
func (*Slicer) AddNewKeyEventListener ¶
func (slicer *Slicer) AddNewKeyEventListener(listener SlicerNewKeyEventListener)
func (*Slicer) Emit ¶
func (slicer *Slicer) Emit(recordSets []FluentRecordSet) error
type SpawneeStatus ¶
type Spawner ¶
type Spawner struct {
// contains filtered or unexported fields
}
func NewSpawner ¶
func NewSpawner() *Spawner
func (*Spawner) GetRunningSpawnees ¶
func (*Spawner) GetSpawneeStatuses ¶
func (spawner *Spawner) GetSpawneeStatuses() ([]SpawneeStatus, error)
func (*Spawner) GetStoppedSpawnees ¶
func (*Spawner) PollMultiple ¶
type StringVector ¶
type StringVector []string
func (*StringVector) Append ¶
func (sv *StringVector) Append(v string)
func (*StringVector) First ¶
func (sv *StringVector) First() string
func (*StringVector) Last ¶
func (sv *StringVector) Last() string
func (*StringVector) Pop ¶
func (sv *StringVector) Pop() string
func (*StringVector) Push ¶
func (sv *StringVector) Push(v string)
func (*StringVector) Shift ¶
func (sv *StringVector) Shift() string
type TinyFluentRecord ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.