store

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrArtifactNotFoundinSrc = fmt.Errorf("artifact not found in src")
	ErrArtifactAlreadyExists = fmt.Errorf("artifact already exists")
)

Functions

func Sync

func Sync(ctx context.Context, src, dst Store, id string, ignoreAlreadyExists bool) (err error)

Sync an item from the src store to the dst store. In case the item exists in dst Sync does nothing and returns nil.

Types

type Artifact

type Artifact interface {
	io.ReadWriteCloser
}

type Store

type Store interface {
	NewArtifact(_ context.Context, artifactID string, size int64) (io.WriteCloser, error)
	GetArtifact(_ context.Context, id string) (io.ReadCloser, int64, error)

	List(context.Context) ([]string, error)

	Clean(context.Context) error

	ArtifactExists(ctx context.Context, id string) bool

	ArtifactRemove(ctx context.Context, id string) error

	Done() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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