archive

package
v0.0.0-...-21afe0a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

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.

Directories

Path Synopsis
Package main implements a simple CLI tool to load and interact with Google Storage archived data.
Package main implements a simple CLI tool to load and interact with Google Storage archived data.

Jump to

Keyboard shortcuts

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