pclog

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUniqueID added in v0.43.1

func GenerateUniqueID(length int) string

Types

type Connector added in v0.43.1

type Connector struct {
	LogObserver
	// contains filtered or unexported fields
}

func NewConnector added in v0.43.1

func NewConnector(mlHandler multiLineHandler, slHandler lineHandler, tail int) *Connector

func (*Connector) AddLine added in v0.43.1

func (c *Connector) AddLine(line string)

func (*Connector) GetTailLength added in v0.43.1

func (c *Connector) GetTailLength() int

func (*Connector) GetUniqueID added in v0.43.1

func (c *Connector) GetUniqueID() string

func (*Connector) SetLines added in v0.43.1

func (c *Connector) SetLines(lines []string)

type LogObserver added in v0.43.1

type LogObserver interface {
	AddLine(line string)
	SetLines(lines []string)
	GetTailLength() int
	GetUniqueID() string
}

type PCLog

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

func NewLogger

func NewLogger(outputPath string) *PCLog

func (*PCLog) Close

func (l *PCLog) Close()

func (*PCLog) Error

func (l *PCLog) Error(message string, process string, replica int)

func (*PCLog) Info

func (l *PCLog) Info(message string, process string, replica int)

type PcLogger

type PcLogger interface {
	Info(message string, process string, replica int)
	Error(message string, process string, replica int)
	Close()
}

type PcNilLog

type PcNilLog struct {
}

func NewNilLogger

func NewNilLogger() *PcNilLog

func (*PcNilLog) Close

func (l *PcNilLog) Close()

func (*PcNilLog) Error

func (l *PcNilLog) Error(message string, process string, replica int)

func (*PcNilLog) Info

func (l *PcNilLog) Info(message string, process string, replica int)

func (*PcNilLog) Sync

func (l *PcNilLog) Sync()

type ProcessLogBuffer

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

func NewLogBuffer

func NewLogBuffer(size int) *ProcessLogBuffer

func (*ProcessLogBuffer) GetLogLength added in v0.10.0

func (b *ProcessLogBuffer) GetLogLength() int

func (*ProcessLogBuffer) GetLogLine added in v0.10.0

func (b *ProcessLogBuffer) GetLogLine(lineIndex int) string

func (*ProcessLogBuffer) GetLogRange added in v0.10.0

func (b *ProcessLogBuffer) GetLogRange(offsetFromEnd, limit int) []string

func (*ProcessLogBuffer) GetLogsAndSubscribe added in v0.10.0

func (b *ProcessLogBuffer) GetLogsAndSubscribe(observer LogObserver)

func (*ProcessLogBuffer) Subscribe added in v0.43.1

func (b *ProcessLogBuffer) Subscribe(observer LogObserver)

func (*ProcessLogBuffer) UnSubscribe added in v0.10.0

func (b *ProcessLogBuffer) UnSubscribe(observer LogObserver)

func (*ProcessLogBuffer) Write

func (b *ProcessLogBuffer) Write(message string)

Jump to

Keyboard shortcuts

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