Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMetadataNotExist should be returned by ReadMetadata() when no metadata is found. // Callers should check for this error, since in certain conditions no metadata is desired. ErrMetadataNotExist = errors.New("metadata does not exist") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
ReadMetadata(context.Context, *v1alpha1.Metadata, string) error
WriteMetadata(context.Context, *v1alpha1.Metadata, string) error
ReadObject(context.Context, string, interface{}) error
WriteObject(context.Context, string, interface{}) error
GetWriter(context.Context, string) (io.Writer, error)
CheckConfig(v1alpha1.StorageConfig) error
}
func NewLocalBackend ¶
func NewRegistryBackend ¶
type Committer ¶
type Committer interface {
// Commit the set of writes to the Backend for persistence.
// Commit is NOT guaranteed to be threadsafe, see implementer comments for details.
Commit(context.Context) error
}
Committer is a Backend that collects a set of write operations into a transaction then commits them atomically. The technologies underlying these Backends are typically transactional by nature (like git); this interface exposes that nature.
Click to show internal directories.
Click to hide internal directories.