pclog

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 PcLogObserver added in v0.10.0

type PcLogObserver interface {
	AddLine(line string)
	SetLines(lines []string)
}

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 PcLogObserver)

func (*ProcessLogBuffer) UnSubscribe added in v0.10.0

func (b *ProcessLogBuffer) UnSubscribe()

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
JackTT - Gopher 🇻🇳