storage

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 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(catalog string, fsys fs.FS) error
	Delete(catalog string) error
	ContentURL(catalog string) string
	StorageServerHandler() http.Handler
}

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 LocalDir

type LocalDir struct {
	RootDir string
	BaseURL *url.URL
}

LocalDir 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 it's 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 (LocalDir) ContentURL added in v0.7.0

func (s LocalDir) ContentURL(catalog string) string

func (LocalDir) Delete

func (s LocalDir) Delete(catalog string) error

func (LocalDir) StorageServerHandler

func (s LocalDir) StorageServerHandler() http.Handler

func (LocalDir) Store

func (s LocalDir) Store(catalog string, fsys fs.FS) error

Jump to

Keyboard shortcuts

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