container

package
v0.0.0-...-1d9613f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerTailer

type DockerTailer struct {
	ContainerID string
	// contains filtered or unexported fields
}

DockerTailer tails logs coming from stdout and stderr of a docker container With docker api, there is no way to know if a log comes from strout or stderr so if we want to capture the severity, we need to tail both in two goroutines

func NewDockerTailer

func NewDockerTailer(cli *client.Client, container types.Container, source *config.LogSource, outputChan chan message.Message) *DockerTailer

NewDockerTailer returns a new DockerTailer

func (*DockerTailer) Identifier

func (dt *DockerTailer) Identifier() string

Identifier returns a string that uniquely identifies a source

func (*DockerTailer) Stop

func (dt *DockerTailer) Stop()

Stop stops the tailer from reading new container logs, this call blocks until the decoder is completely flushed

type Scanner

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

A Scanner listens for stdout and stderr of containers

func New

func New(sources []*config.LogSource, pp pipeline.Provider, a *auditor.Auditor) *Scanner

New returns an initialized Scanner

func (*Scanner) Start

func (s *Scanner) Start()

Start starts the Scanner

func (*Scanner) Stop

func (s *Scanner) Stop()

Stop stops the Scanner and its tailers in parallel, this call returns only when all the tailers are stopped

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL