docklog

package
v0.9.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MPL-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PluginName = "docker_logger"

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerLogger

type DockerLogger interface {
	Start(*StartOpts) error
	Stop() error
}

DockerLogger is a small utility to forward logs from a docker container to a target destination

func LaunchDockerLogger

func LaunchDockerLogger(logger hclog.Logger) (DockerLogger, *plugin.Client, error)

LaunchDockerLogger launches an instance of DockerLogger

func NewDockerLogger

func NewDockerLogger(logger hclog.Logger) DockerLogger

NewDockerLogger returns an implementation of the DockerLogger interface

func ReattachDockerLogger

func ReattachDockerLogger(reattachCfg *plugin.ReattachConfig) (DockerLogger, *plugin.Client, error)

type Plugin

type Plugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

Plugin is the go-plugin implementation

func NewPlugin

func NewPlugin(impl DockerLogger) *Plugin

func (*Plugin) GRPCClient

func (p *Plugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a client side implementation of the plugin

func (*Plugin) GRPCServer

func (p *Plugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer registered the server side implementation with the grpc server

type StartOpts

type StartOpts struct {
	// Endpoint sets the docker client endpoint, defaults to environment if not set
	Endpoint string

	// ContainerID of the container to monitor logs for
	ContainerID string

	// Stdout path to fifo
	Stdout string
	//Stderr path to fifo
	Stderr string

	// TLS settings for docker client
	TLSCert string
	TLSKey  string
	TLSCA   string
}

StartOpts are the options needed to start docker log monitoring

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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