Documentation
¶
Index ¶
Constants ¶
View Source
const ( BackendTypeOSS = "oss" BackendTypeLocalFS = "localfs" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// Push pushes specified blob file to remote storage backend.
Push(ctx context.Context, ra content.ReaderAt, blobDigest digest.Digest) error
// Check checks whether a blob exists in remote storage backend,
// blob exists -> return (blobPath, nil)
// blob not exists -> return ("", err)
Check(blobDigest digest.Digest) (string, error)
// Type returns backend type name.
Type() string
}
Backend uploads blobs generated by nydus-image builder to a backend storage such as: - oss: A object storage backend, which uses its SDK to upload blob file.
func NewBackend ¶
Nydus driver majorly works for registry backend, which means blob is stored in registry as per OCI distribution specification. But nydus can also make OSS or other storage services as backend storage. Pass config as byte slice here because we haven't find a way to represent all backend config at the same time.
type LocalFSBackend ¶
type LocalFSBackend struct {
// contains filtered or unexported fields
}
func (*LocalFSBackend) Check ¶
func (b *LocalFSBackend) Check(blobDigest digest.Digest) (string, error)
func (*LocalFSBackend) Type ¶
func (b *LocalFSBackend) Type() string
type OSSBackend ¶
type OSSBackend struct {
// contains filtered or unexported fields
}
func (*OSSBackend) Type ¶
func (b *OSSBackend) Type() string
Click to show internal directories.
Click to hide internal directories.