storage

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance interface {
	Store(ctx context.Context, catalog string, fsys fs.FS) error
	Delete(catalog string) error
	BaseURL(catalog string) string
	StorageServerHandler() http.Handler
	ContentExists(catalog string) bool
}

Instance is a storage instance that stores FBC content of catalogs added to a cluster. It can be used to Store or Delete FBC in the host's filesystem. It also a manager runnable object, that starts a server to serve the content stored.

type LocalDirV1 added in v0.34.0

type LocalDirV1 struct {
	RootDir string
	RootURL *url.URL
}

LocalDirV1 is a storage Instance. When Storing a new FBC contained in fs.FS, the content is first written to a temporary file, after which it is copied to its final destination in RootDir/catalogName/. This is done so that clients accessing the content stored in RootDir/catalogName have atomic view of the content for a catalog.

func (LocalDirV1) BaseURL added in v0.34.0

func (s LocalDirV1) BaseURL(catalog string) string

func (LocalDirV1) ContentExists added in v0.34.0

func (s LocalDirV1) ContentExists(catalog string) bool

func (LocalDirV1) Delete added in v0.34.0

func (s LocalDirV1) Delete(catalog string) error

func (LocalDirV1) StorageServerHandler added in v0.34.0

func (s LocalDirV1) StorageServerHandler() http.Handler

func (LocalDirV1) Store added in v0.34.0

func (s LocalDirV1) Store(ctx context.Context, catalog string, fsys fs.FS) error

Jump to

Keyboard shortcuts

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