luci: go.chromium.org/luci/logdog/common/storage/archive Index | Files | Directories

package archive

import "go.chromium.org/luci/logdog/common/storage/archive"

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

Package Files

cache.go storage.go

func New Uses

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

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

type Options Uses

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

PathSynopsis
logdog_archive_testPackage main implements a simple CLI tool to load and interact with Google Storage archived data.

Package archive imports 17 packages (graph) and is imported by 6 packages. Updated 2018-12-14. Refresh now. Tools for package owners.