Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainersProvider ¶
type ContainersProvider interface {
Containers() (containers.Containers, error)
}
ContainersProvider is a containers provider interface for dispatcher
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher starts and stops followers according to ContainersProvider targets, multiplexes their outputs into output; based on config, starts system journal special follower and pipes its output separately
func NewDispatcher ¶
func NewDispatcher( config configuration.Config, followerFabric workers.FollowerFabric, containersProvider ContainersProvider, cursorStorage workers.Storage, logger logging.Logger) *Dispatcher
NewDispatcher is a Dispatcher constructor
func (*Dispatcher) Out ¶
func (d *Dispatcher) Out() <-chan *common.Entry
Out is a dispatcher output channel accessor
func (*Dispatcher) OutJournald ¶
func (d *Dispatcher) OutJournald() <-chan string
OutJournald is a dispatcher outputJournald channel accessor
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start(ctx context.Context)
Start starts Dispatcher. Dispatcher quits when context is done.
type FollowerPool ¶
FollowerPool is a map of Follower instances to control over
func (*FollowerPool) Add ¶
func (fp *FollowerPool) Add(path string, follower workers.Follower)
Add adds follower to pool by path
func (*FollowerPool) Get ¶
func (fp *FollowerPool) Get(path string) (follower workers.Follower, ok bool)
Get returns follower and present flag by path
func (*FollowerPool) Pool ¶
func (fp *FollowerPool) Pool() (pool map[string]workers.Follower)
Pool returns copy of current pool
func (*FollowerPool) Remove ¶
func (fp *FollowerPool) Remove(path string)
Remove removes follower from pool by path