object

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const S3Schema = "s3i"

S3Schema is a custom scheme for gocloud blob which works with how we interact with s3 (supports interfacing with minio)

Variables

This section is empty.

Functions

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, lastModified time.Time) *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 NewFileInfo

func NewFileInfo(name string, size int64, modTime time.Time) *FileInfo

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