logspool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Directory        string
	TaskID           string
	BaseURL          string
	AccessToken      string
	ChunkBytes       int64
	MaxBytes         int64
	RetryDelay       time.Duration
	FlushInterval    time.Duration
	FlushIntervalMin time.Duration
	FlushIntervalMax time.Duration
	HTTPClient       *http.Client
	Log              *slog.Logger
}

type Spool

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

Spool converts process output to NDJSON and durably stages bounded chunks. One uploader sends sealed chunks in sequence and deletes only acknowledged files.

func New

func New(config Config) (*Spool, error)

func (*Spool) Close

func (s *Spool) Close() error

func (*Spool) PeakBytes

func (s *Spool) PeakBytes() int64

func (*Spool) Wait

func (s *Spool) Wait(ctx context.Context) error

func (*Spool) Write

func (s *Spool) Write(content []byte) (int, error)

Jump to

Keyboard shortcuts

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