logstorage

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogStoragePath

func GetLogStoragePath(teamID, moduleID, runID string) string

func NewBufferCloser

func NewBufferCloser() *bufferCloser

func NewLogStrArr

func NewLogStrArr() *logStrArr

Types

type LogGetOpts

type LogGetOpts struct {
	Path  string
	Count uint
}

type LogStorageBackend

type LogStorageBackend interface {
	// GetID retrieves an ID for the log storage backend
	GetID() string

	// StreamLogs streams logs to the WriteCloser, blocking until the context is cancelled
	StreamLogs(ctx context.Context, opts *LogGetOpts, w io.WriteCloser) error

	// ReadLogs is like StreamLogs, except it returns when all current logs have been read
	ReadLogs(ctx context.Context, opts *LogGetOpts, w io.WriteCloser) error

	// ClearLogs deletes all logs corresponding to the path
	ClearLogs(ctx context.Context, path string) error

	// PushLogLine adds a single log line to the log collection defined by the path
	PushLogLine(ctx context.Context, path string, log []byte) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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