Documentation ¶ Index ¶ type Config type Spool func New(config Config) (*Spool, error) func (s *Spool) Close() error func (s *Spool) PeakBytes() int64 func (s *Spool) Wait(ctx context.Context) error func (s *Spool) Write(content []byte) (int, error) 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) Source Files ¶ View all Source files records.gospool.go Click to show internal directories. Click to hide internal directories.