gcp

package
v0.0.0-...-1042a06 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package gcp contains a GCP-based storage implementation for Tessera.

TODO: decide whether to rename this package.

This storage implementation uses GCS for long-term storage and serving of entry bundles and log tiles, and Spanner for coordinating updates to GCS when multiple instances of a personality binary are running.

A single GCS bucket is used to hold entry bundles and log internal tiles. The object keys for the bucket are selected so as to conform to the expected layout of a tile-based log.

A Spanner database provides a transactional mechanism to allow multiple frontends to safely update the contents of the log.

Index

Constants

View Source
const (
	DefaultPushbackMaxOutstanding = 4096
	DefaultIntegrationSizeLimit   = 5 * 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ProjectID is the GCP project which hosts the storage bucket and Spanner database for the log.
	ProjectID string
	// Bucket is the name of the GCS bucket to use for storing log state.
	Bucket string
	// Spanner is the GCP resource URI of the spanner database instance to use.
	Spanner string
}

Config holds GCP project and resource configuration for a storage instance.

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage is a GCP based storage implementation for Tessera.

func New

func New(ctx context.Context, cfg Config, opts ...func(*tessera.StorageOptions)) (*Storage, error)

New creates a new instance of the GCP based Storage.

func (*Storage) Add

func (s *Storage) Add(ctx context.Context, e *tessera.Entry) (uint64, error)

Add is the entrypoint for adding entries to a sequencing log.

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, path string) ([]byte, error)

Get returns the requested object.

This is indended to be used to proxy read requests through the personality for debug/testing purposes.

Jump to

Keyboard shortcuts

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