logs

package
v0.0.0-...-b022d11 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Discard = "__discard__"

Discard .

Variables

View Source
var CloseWaitInterval = time.Second * 5

CloseWaitInterval .

View Source
var KeepaliveInterval = time.Second * 30

KeepaliveInterval .

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(*types.Log) error
	Close() error
}

Encoder .

type JournalEncoder

type JournalEncoder struct {
	sync.Mutex
}

JournalEncoder .

func CreateJournalEncoder

func CreateJournalEncoder() (*JournalEncoder, error)

CreateJournalEncoder .

func (*JournalEncoder) Close

func (c *JournalEncoder) Close() (err error)

Close .

func (*JournalEncoder) Encode

func (c *JournalEncoder) Encode(logline *types.Log) error

Encode .

type StreamEncoder

type StreamEncoder struct {
	*json.Encoder
	// contains filtered or unexported fields
}

StreamEncoder .

func NewStreamEncoder

func NewStreamEncoder(wt io.WriteCloser) *StreamEncoder

NewStreamEncoder .

func (*StreamEncoder) Close

func (e *StreamEncoder) Close() error

Close .

func (*StreamEncoder) Encode

func (e *StreamEncoder) Encode(logline *types.Log) error

Encode .

type Writer

type Writer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Writer is a writer!

func NewWriter

func NewWriter(ctx context.Context, addr string, stdout bool) (writer *Writer, err error)

NewWriter return writer

func (*Writer) Write

func (w *Writer) Write(logline *types.Log) error

Write write log to remote

Jump to

Keyboard shortcuts

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