fstore

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Counters = []prometheus.CounterDefinition{
	{
		Name: functionsInstalledMetric,
		Help: "Number of functions installed on this node.",
	},
	{
		Name: functionsInstalledOkMetric,
		Help: "Number of successful function installs on this node in this session.",
	},
	{
		Name: functionsInstalledErrMetric,
		Help: "Number of unsuccessful functions installs on this node in this session.",
	},
	{
		Name: functionsDownloadedSizeMetric,
		Help: "Total size of (compressed) functions installed by the node in this session.",
	},
}
View Source
var Summaries = []prometheus.SummaryDefinition{
	{
		Name: functionsInstallTimeMetric,
		Help: "Total time spent downloading and installing functions",
	},
}

Functions

This section is empty.

Types

type FStore

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

FStore - function store - deals with all of the function-related actions - saving/reading them from backing storage, downloading them, unpacking them etc.

func New

func New(log zerolog.Logger, store blockless.FunctionStore, workdir string) *FStore

New creates a new function store.

func (*FStore) Get

Get retrieves a function manifest for the given function from storage.

func (*FStore) Install

func (f *FStore) Install(ctx context.Context, address string, cid string) (retErr error)

Install will download and install function identified by the manifest/CID.

func (*FStore) IsInstalled added in v0.7.0

func (f *FStore) IsInstalled(cid string) (bool, error)

Installed checks if the function with the given CID is installed.

func (*FStore) Sync

func (f *FStore) Sync(ctx context.Context, haltOnError bool) error

Jump to

Keyboard shortcuts

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