archive

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package archive constructs a LogDog archive out of log stream components. Records are read from the stream and emitted as an archive.

Package archive constructs a LogDog archive out of log stream components. Records are read from the stream and emitted as an archive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(m Manifest) error

Archive performs the log archival described in the supplied Manifest.

Types

type CLLogger

type CLLogger interface {
	Log(cl.Entry)
}

CLLogger is a general interface for CloudLogging logger and intended to enable unit tests and stub out CloudLogging.

type Manifest

type Manifest struct {
	// LUCIProject is the LUCI project for the stream.
	LUCIProject string

	// Desc is the logpb.LogStreamDescriptor for the stream.
	Desc *logpb.LogStreamDescriptor
	// Source is the LogEntry Source for the stream.
	Source renderer.Source

	// LogWriter, if not nil, is the Writer to which the log stream record stream
	// will be written.
	LogWriter io.Writer
	// IndexWriter, if not nil, is the Writer to which the log stream Index
	// protobuf stream will be written.
	IndexWriter io.Writer

	// StreamIndexRange, if >0, is the maximum number of log entry stream indices
	// in between successive index entries.
	//
	// If no index constraints are set, an index entry will be emitted for each
	// LogEntry.
	StreamIndexRange int
	// PrefixIndexRange, if >0, is the maximum number of log entry prefix indices
	// in between successive index entries.
	PrefixIndexRange int
	// ByteRange, if >0, is the maximum number of log entry bytes in between
	// successive index entries.
	ByteRange int

	// Logger, if not nil, will be used to log status during archival.
	Logger logging.Logger

	// CloudLogger, if not nil, will be used to export archived log entries to
	// Cloud Logging.
	CloudLogger CLLogger
	// contains filtered or unexported fields
}

Manifest is a set of archival parameters.

Jump to

Keyboard shortcuts

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