Back to

Package archive

Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module:


Package archive implements a storage.Storage instance that retrieves logs from a Google Storage archive.

This is a special implementation of storage.Storage, and does not fully conform to the API expecations. Namely:

- It is read-only. Mutation methods will return storage.ErrReadOnly.
- Storage methods ignore the supplied Path argument, instead opting for
  the archive configured in its Options.


func New

func New(o Options) (storage.Storage, error)

New instantiates a new Storage instance, bound to the supplied Options.

type Options

type Options struct {
	// Index is the Google Storage URL for the stream's index.
	Index gs.Path
	// Stream is the Google Storage URL for the stream's entries.
	Stream gs.Path

	// Client is the HTTP client to use for authentication.
	// Closing this Storage instance does not close the underlying Client.
	Client gs.Client

	// Cache, if not nil, will be used to cache data.
	Cache storage.Cache

Options is the set of configuration options for this Storage instance.

Unlike other Storage instances, this is bound to a single archived stream. Project and Path parameters in requests will be ignored in favor of the Google Storage URLs.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier