logpersister

package
v0.49.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package logpersister provides a piped component that enqueues all log blocks from running stages and then periodically sends to the control plane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPersister

func NewPersister(apiClient apiClient, logger *zap.Logger) *persister

NewPersister creates a new persister instance for saving the stage logs into server's storage. This controls how many concurent api calls should be executed and when to flush the logs.

Types

type Persister

type Persister interface {
	Run(ctx context.Context) error
	StageLogPersister(deploymentID, stageID string) StageLogPersister
}

type StageLogPersister

type StageLogPersister interface {
	Write(log []byte) (int, error)
	Info(log string)
	Infof(format string, a ...interface{})
	Success(log string)
	Successf(format string, a ...interface{})
	Error(log string)
	Errorf(format string, a ...interface{})
	Complete(timeout time.Duration) error
}

Jump to

Keyboard shortcuts

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