storage

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFetchTTL     = 10 * time.Second
	DefaultFetchTimeout = 2 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	URL          string
	Auth         transport.AuthMethod
	FetchTTL     time.Duration
	FetchTimeout time.Duration
	// contains filtered or unexported fields
}

func NewGit

func NewGit(URL string) *Git

func (*Git) Provide

func (g *Git) Provide(ctx context.Context, namespace string) (fs ReadonlyFs, err error)

type Provider

type Provider interface {
	// Provide is used to provide readonly filesystem by namespace
	Provide(ctx context.Context, namespace string) (fs ReadonlyFs, err error)
}

type ReadonlyFile

type ReadonlyFile interface {
	io.ReadCloser
}

type ReadonlyFs

type ReadonlyFs interface {
	io.Closer

	// Open open a readonly file for reading, the associated file descriptor has mode O_RDONLY.
	Open(name string) (ReadonlyFile, error)
}

Jump to

Keyboard shortcuts

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