logs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBufferSize is the default buffer size. This based on the recommended
	// gRPC message size for streamed content, which ranges from 16 to 64 KiB. Choosing 32 KiB as a
	// middle ground between the two.
	DefaultBufferSize = 32 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedLog

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

func NewBufferedWriter

func NewBufferedWriter(sender Sender, name string, size int) *BufferedLog

NewBufferedWriter returns an io.Writer that writes log chunk messages to the gRPC sender for the named Tekton result. The chunk size determines the maximum size of a single sent message - if less than zero, this defaults to DefaultBufferSize.

func (*BufferedLog) Flush

func (w *BufferedLog) Flush() (int, error)

func (*BufferedLog) Write

func (w *BufferedLog) Write(p []byte) (n int, err error)

type Sender

type Sender interface {
	Send(log *pb.Log) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳