blobstore

package
v0.0.0-...-ea0be71 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Interface for writing blob store adapters to Varasto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// backing store must be idempotent, i.e. writing same blob again must not change outcome.
	// write also must be atomic. Fetch() must not return anything before store is completed succesfully.
	RawStore(ctx context.Context, ref stotypes.BlobRef, content io.Reader) error

	// raw = driver doesn't do any encryption/compression/integrity verifications,
	//       they are done at a higher level.
	// if blob is not found, error must report os.IsNotExist(err) == true
	RawFetch(ctx context.Context, ref stotypes.BlobRef) (io.ReadCloser, error)

	// if blob is stored in multiple volumes, disk access controller fetches from the volume
	// (that is mounted) with the lowest routing cost.
	// currently 10 for local disks, 20 for cloud services.
	RoutingCost() int
}

Directories

Path Synopsis
Writes your blobs to Google Drive
Writes your blobs to Google Drive
Stores your blobs on local FS-accessible paths
Stores your blobs on local FS-accessible paths
Writes your blobs to AWS S3
Writes your blobs to AWS S3

Jump to

Keyboard shortcuts

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