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 Manifest

type Manifest struct {
	// 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
	// contains filtered or unexported fields
}

Manifest is a set of archival parameters.