bundles

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDataBundle

func LoadDataBundle(path string) (bundle.Bundle, error)

LoadDataBundle loads a bundle from the given path but only includes data files. The path must contain a bundle manifest file.

Types

type Cache

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

Cache is a struct that maintains a number of bundles in memory and provides a way to refresh them when the source files change.

func NewCache

func NewCache(opts *CacheOptions) *Cache

func (*Cache) All

func (c *Cache) All() map[string]bundle.Bundle

All returns all the bundles in the cache.

func (*Cache) Get

func (c *Cache) Get(root string) (bundle.Bundle, bool)

Get returns the bundle for the given root from the cache.

func (*Cache) List

func (c *Cache) List() []string

List returns a list of all the bundle roots that are currently present in the cache.

func (*Cache) Refresh

func (c *Cache) Refresh() ([]string, error)

Refresh walks the workspace path and loads or refreshes any bundles that have changed since the last refresh.

type CacheOptions

type CacheOptions struct {
	ErrorLog      io.Writer
	WorkspacePath string
}

Jump to

Keyboard shortcuts

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