This section is empty.


This section is empty.


func NewPlugin

func NewPlugin(i LogMon) plugin.Plugin


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 {
	// 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


Path Synopsis