fstore

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

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