logging

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Init

func Init(debug bool)

Types

type LogSender

type LogSender interface {
	ShipLogs(ctx context.Context, lines []string) error
}

LogSender is the interface for shipping logs. Avoids import cycle with api package.

type Shipper

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

Shipper captures log output and ships it to the API in batches.

func NewShipper

func NewShipper(sender LogSender, interval time.Duration) *Shipper

NewShipper creates a log shipper that batches and sends logs.

func (*Shipper) Start

func (s *Shipper) Start(ctx context.Context)

Start begins the shipping loop. Call in a goroutine.

func (*Shipper) Write

func (s *Shipper) Write(p []byte) (n int, err error)

Write implements io.Writer so it can be used as a zerolog output.

Jump to

Keyboard shortcuts

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