bucket

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bucket is the object store seam of the store service. One Store is one bucket of immutable objects. Implementations: Google Cloud Storage (bucket/gcs) and a filesystem directory (bucket/fs). The conformance suite is bucket/buckettest.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("bucket: object not found")

ErrNotFound is a read of a key that no object holds.

Functions

This section is empty.

Types

type Store

type Store interface {
	// Create writes data when key is absent and reports whether it wrote. A
	// stored object is never replaced or deleted. Of concurrent creators of
	// one key, exactly one gets created true. A later read of the key sees
	// the whole object.
	Create(ctx context.Context, key string, data []byte) (created bool, err error)
	// Get returns the object, or ErrNotFound.
	Get(ctx context.Context, key string) ([]byte, error)
	// GetRange returns up to n bytes from off, fewer at the end of the
	// object, and none when off is at or past the end. A negative n reads to
	// the end. A missing key is ErrNotFound.
	GetRange(ctx context.Context, key string, off, n int64) ([]byte, error)
}

Directories

Path Synopsis
Package buckettest is the conformance suite of bucket.Store.
Package buckettest is the conformance suite of bucket.Store.
Package fs backs the bucket seam with a directory.
Package fs backs the bucket seam with a directory.
Package gcs backs the bucket seam with Google Cloud Storage.
Package gcs backs the bucket seam with Google Cloud Storage.

Jump to

Keyboard shortcuts

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