filestore

package
v1.121.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RQLITE_S3_MIGRATION_SUCCESS_KEY   = "rqlite.s3.migration.success"
	RQLITE_BLOB_MIGRATION_SUCCESS_KEY = "rqlite.blob.migration.success"
	RQLITE_MIGRATION_SUCCESS_VALUE    = "true"
)

Variables

View Source
var (
	ArchivesDir = "/kotsadmdata/archives"
)
View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func MigrateFromPVCToRqlite added in v1.109.9

func MigrateFromPVCToRqlite(ctx context.Context) error

func MigrateFromS3ToRqlite added in v1.109.9

func MigrateFromS3ToRqlite(ctx context.Context) error

Types

type BlobStore

type BlobStore struct {
}

func (*BlobStore) DeleteArchive added in v1.93.0

func (s *BlobStore) DeleteArchive(path string) error

func (*BlobStore) Init

func (s *BlobStore) Init() error

func (*BlobStore) ReadArchive

func (s *BlobStore) ReadArchive(path string) (string, error)

func (*BlobStore) WaitForReady

func (s *BlobStore) WaitForReady(ctx context.Context) error

func (*BlobStore) WriteArchive

func (s *BlobStore) WriteArchive(outputPath string, body io.ReadSeeker) error

type FileStore

type FileStore interface {
	Init() error
	WaitForReady(ctx context.Context) error
	WriteArchive(outputPath string, body io.ReadSeeker) error
	ReadArchive(path string) (string, error)
	DeleteArchive(path string) error
}

func GetStore

func GetStore() FileStore

type RqliteStore added in v1.109.9

type RqliteStore struct {
}

func (*RqliteStore) DeleteArchive added in v1.109.9

func (s *RqliteStore) DeleteArchive(path string) error

func (*RqliteStore) Init added in v1.109.9

func (s *RqliteStore) Init() error

func (*RqliteStore) ReadArchive added in v1.109.9

func (s *RqliteStore) ReadArchive(path string) (string, error)

func (*RqliteStore) WaitForReady added in v1.109.9

func (s *RqliteStore) WaitForReady(ctx context.Context) error

func (*RqliteStore) WriteArchive added in v1.109.9

func (s *RqliteStore) WriteArchive(outputPath string, body io.ReadSeeker) error

type S3Store

type S3Store struct {
}

func (*S3Store) DeleteArchive added in v1.93.0

func (s *S3Store) DeleteArchive(path string) error

func (*S3Store) Init

func (s *S3Store) Init() error

func (*S3Store) ReadArchive

func (s *S3Store) ReadArchive(path string) (string, error)

func (*S3Store) WaitForReady

func (s *S3Store) WaitForReady(ctx context.Context) error

func (*S3Store) WriteArchive

func (s *S3Store) WriteArchive(outputPath string, body io.ReadSeeker) error

Jump to

Keyboard shortcuts

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