storage

package
v0.19.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: 18 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 HTTP added in v0.5.0

type HTTP struct {
	// contains filtered or unexported fields
}

func NewHTTP added in v0.5.0

func NewHTTP(opts ...HTTPOption) *HTTP

func (*HTTP) Load added in v0.5.0

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

type HTTPOption added in v0.5.0

type HTTPOption func(*HTTP)

func WithBearerToken added in v0.5.0

func WithBearerToken(token string) HTTPOption

func WithInsecureSkipVerify added in v0.5.0

func WithInsecureSkipVerify(v bool) HTTPOption

func WithRootCAs added in v0.5.0

func WithRootCAs(rootCAs *x509.CertPool) HTTPOption

type HTTPRequestOption added in v0.5.0

type HTTPRequestOption func(*http.Request)

type Loader added in v0.5.0

type Loader interface {
	Load(ctx context.Context, owner client.Object) (fs.FS, error)
}

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 {
	Loader
	Storer
}

func WithFallbackLoader added in v0.5.0

func WithFallbackLoader(s Storage, fallback Loader) Storage

type Storer added in v0.5.0

type Storer interface {
	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