object

package
v1.53.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBucket added in v1.41.0

func OpenBucket(ctx context.Context, urlstr *url.URL) (*gcblob.Bucket, error)

OpenBucket opens the bucket identified by the URL given.

See the URLOpener documentation in driver subpackages for details on supported URL formats, and https://gocloud.dev/concepts/urls/ for more information.

func SupportedSchemes added in v1.41.0

func SupportedSchemes() []string

func WithPollOptions

func WithPollOptions(opts ...containers.Option[storagefs.Poller]) containers.Option[SnapshotStore]

WithPollOptions configures the poller options used when periodically updating snapshot state

func WithPrefix

func WithPrefix(prefix string) containers.Option[SnapshotStore]

WithPrefix configures the prefix for object store

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(key string, length int64, body io.ReadCloser, modTime time.Time, etag string) *File

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(p []byte) (int, error)

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

type FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

func (*FileInfo) Etag added in v1.47.0

func (fi *FileInfo) Etag() string

func (*FileInfo) Info

func (fi *FileInfo) Info() (fs.FileInfo, error)

func (*FileInfo) IsDir

func (fi *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (fi *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (fi *FileInfo) Mode() fs.FileMode

func (*FileInfo) Name

func (fi *FileInfo) Name() string

func (*FileInfo) SetDir

func (fi *FileInfo) SetDir(v bool)

func (*FileInfo) Size

func (fi *FileInfo) Size() int64

func (*FileInfo) Sys

func (fi *FileInfo) Sys() any

func (*FileInfo) Type

func (fi *FileInfo) Type() fs.FileMode

type SnapshotStore

type SnapshotStore struct {
	*storagefs.Poller
	// contains filtered or unexported fields
}

func NewSnapshotStore

func NewSnapshotStore(ctx context.Context, logger *zap.Logger, scheme string, bucket *gcblob.Bucket, opts ...containers.Option[SnapshotStore]) (*SnapshotStore, error)

func (*SnapshotStore) String

func (s *SnapshotStore) String() string

func (*SnapshotStore) View

View accepts a function which takes a *StoreSnapshot. The SnapshotStore will supply a snapshot which is valid for the lifetime of the provided function call.

Jump to

Keyboard shortcuts

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