logmon

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(i LogMon) plugin.Plugin

Types

type LogConfig

type LogConfig struct {
	// LogDir is the host path where logs are to be written to
	LogDir string

	// StdoutLogFile is the path relative to LogDir for stdout logging
	StdoutLogFile string

	// StderrLogFile is the path relative to LogDir for stderr logging
	StderrLogFile string

	// StdoutFifo is the path on the host to the stdout pipe
	StdoutFifo string

	// StderrFifo is the path on the host to the stderr pipe
	StderrFifo string

	// MaxFiles is the max rotated files allowed
	MaxFiles int

	// MaxFileSizeMB is the max log file size in MB allowed before rotation occures
	MaxFileSizeMB int
}

type LogMon

type LogMon interface {
	Start(*LogConfig) error
	Stop() error
}

func LaunchLogMon

func LaunchLogMon(logger hclog.Logger, reattachConfig *plugin.ReattachConfig) (LogMon, *plugin.Client, error)

LaunchLogMon launches a new logmon or reattaches to an existing one. TODO: Integrate with base plugin loader

func NewLogMon

func NewLogMon(logger hclog.Logger) LogMon

type Plugin

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

func (*Plugin) GRPCClient

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

func (*Plugin) GRPCServer

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

type TaskLogger

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

func NewTaskLogger

func NewTaskLogger(cfg *LogConfig, logger hclog.Logger) (*TaskLogger, error)

func (*TaskLogger) Close

func (tl *TaskLogger) Close()

func (*TaskLogger) IsRunning

func (tl *TaskLogger) IsRunning() bool

IsRunning will return true as long as one rotator wrapper is still running

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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