bufmodulestorage

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key added in v0.25.0

type Key []string

Key is a list of strings used to uniquely identify a module within the Store. Each element of the key must be a valid path component.

func NewModulePinKey added in v0.34.0

func NewModulePinKey(modulePin bufmodule.ModulePin) Key

NewModulePinKey returns a new Key for the ModulePin.

This does not use digest.

type Store added in v0.25.0

type Store interface {
	Get(ctx context.Context, moduleKey Key) (bufmodule.Module, error)
	Put(ctx context.Context, moduleKey Key, module bufmodule.Module) error
	Delete(ctx context.Context, moduleKey Key) error
	// ForEachKey iterates over every key and calls f.
	//
	// If an error occurs during iteration, it will be passed to f. If f
	// returns nil, the iteration will continue, else if it returns error,
	// the iteration will stop and the error will be returned.
	ForEachKey(ctx context.Context, f func(Key, error) error) error
}

Store is the interface implemented by the module store.

func NewStore added in v0.25.0

func NewStore(logger *zap.Logger, readWriteBucket storage.ReadWriteBucket) Store

NewStore creates a new module store backed by the readWriteBucket.

Jump to

Keyboard shortcuts

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