vfs

package
v1.51.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	io.Reader
	io.Closer
}

File represents an open file, which will typically be the response body of a Pages request.

type Root added in v1.24.0

type Root interface {
	Lstat(ctx context.Context, name string) (os.FileInfo, error)
	Readlink(ctx context.Context, name string) (string, error)
	Open(ctx context.Context, name string) (File, error)
}

Root abstracts the things Pages needs to serve a static site from a given root rootPath.

type SeekableFile added in v1.26.0

type SeekableFile interface {
	File
	io.Seeker
}

SeekableFile represents a seekable file, which will typically be the response body of a Pages request.

type VFS

type VFS interface {
	Root(ctx context.Context, path string, cacheKey string) (Root, error)
	Name() string
	Reconfigure(config *config.Config) error
}

VFS abstracts the things Pages needs to serve a static site from disk.

func Instrumented

func Instrumented(fs VFS) VFS

Directories

Path Synopsis
nolint
nolint

Jump to

Keyboard shortcuts

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