storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBundleCacheDir = "/var/cache/bundles"

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalDirectory added in v0.4.0

type LocalDirectory struct {
	RootDirectory string
	URL           url.URL
}

func (*LocalDirectory) Delete added in v0.4.0

func (s *LocalDirectory) Delete(_ context.Context, owner client.Object) error

func (*LocalDirectory) Load added in v0.4.0

func (s *LocalDirectory) Load(_ context.Context, owner client.Object) (fs.FS, error)

func (*LocalDirectory) ServeHTTP added in v0.4.0

func (s *LocalDirectory) ServeHTTP(resp http.ResponseWriter, req *http.Request)

func (*LocalDirectory) Store added in v0.4.0

func (s *LocalDirectory) Store(_ context.Context, owner client.Object, bundle fs.FS) error

func (*LocalDirectory) URLFor added in v0.4.0

func (s *LocalDirectory) URLFor(_ context.Context, owner client.Object) (string, error)

type Storage

type Storage interface {
	Load(ctx context.Context, owner client.Object) (fs.FS, error)
	Store(ctx context.Context, owner client.Object, bundle fs.FS) error
	Delete(ctx context.Context, owner client.Object) error

	http.Handler
	URLFor(ctx context.Context, owner client.Object) (string, error)
}

Jump to

Keyboard shortcuts

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