fstore

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 Store, workdir string) *FStore

New creates a new function store.

func (*FStore) Get

func (h *FStore) Get(cid string) (*blockless.FunctionManifest, error)

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

func (*FStore) Install

func (h *FStore) Install(address string, cid string) error

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

func (*FStore) Installed

func (h *FStore) Installed(cid string) (bool, error)

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

func (*FStore) InstalledFunctions

func (h *FStore) InstalledFunctions() ([]string, error)

InstalledFunctions will return the CIDs of all functions found in local storage.

func (*FStore) Sync

func (h *FStore) Sync(cid string) error

Sync will verify that the function identified by `cid` is still found on the local filesystem. If the function archive of function files are missing, they will be recreated.

type Store

type Store interface {
	GetRecord(string, interface{}) error
	SetRecord(string, interface{}) error
	Keys() []string
}

Jump to

Keyboard shortcuts

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