logarchiver

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Duration          time.Duration `json:",omitempty"`
	Error             string        `json:",omitempty"`
	RequestorUsername string        `json:",omitempty"`
}

type BuildInfos

type BuildInfos struct {
	Builds      map[string]BuildInfo // Key: image name.
	ImagesByAge []string             // May be empty.
}

type BuildLogArchiveOptions

type BuildLogArchiveOptions struct {
	Quota  uint64
	Topdir string
}

type BuildLogArchiveParams

type BuildLogArchiveParams struct {
	Logger log.DebugLogger
}

type BuildLogArchiver

type BuildLogArchiver interface {
	AddBuildLog(string, BuildInfo, []byte) error
}

func NewNullLogger

func NewNullLogger() BuildLogArchiver

type BuildLogReporter

type BuildLogReporter interface {
	GetBuildInfos(incGood, incBad bool) *BuildInfos
	GetBuildInfosForRequestor(username string, incGood, incBad bool) *BuildInfos
	GetBuildInfosForStream(streamName string, incGood, incBad bool) *BuildInfos
	GetBuildLog(imageName string) (io.ReadCloser, error)
	GetSummary() *Summary
}

type BuildLogger

type BuildLogger interface {
	BuildLogArchiver
	BuildLogReporter
}

type RequestorSummary

type RequestorSummary struct {
	NumBuilds      uint64
	NumGoodBuilds  uint64
	NumErrorBuilds uint64
}

type StreamSummary

type StreamSummary struct {
	NumBuilds      uint64
	NumGoodBuilds  uint64
	NumErrorBuilds uint64
}

type Summary

type Summary struct {
	Requestors map[string]*RequestorSummary // Key: username.
	Streams    map[string]*StreamSummary    // Key: stream name.
}

Jump to

Keyboard shortcuts

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