storage

package
v2.7.3 Latest Latest
Warning

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

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

Documentation

Overview

Package storage provides the storage for FaaS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllFunctionSpecPrefix

func GetAllFunctionSpecPrefix(controllerName string) string

GetAllFunctionSpecPrefix returns the prefix of one faasController's all functions specs.

func GetAllFunctionStatusPrefix

func GetAllFunctionStatusPrefix(controllerName string) string

GetAllFunctionStatusPrefix returns the prefix of one faasController's all functions status.

func GetFunctionSpecPrefix

func GetFunctionSpecPrefix(controllerName, functionName string) string

GetFunctionSpecPrefix returns the prefix of one function spec.

func GetFunctionStatusPrefix

func GetFunctionStatusPrefix(controllerName, functionName string) string

GetFunctionStatusPrefix returns the prefix of one function statues.

Types

type Storage

type Storage interface {
	Lock() error
	Unlock() error

	Get(key string) (*string, error)
	GetPrefix(prefix string) (map[string]string, error)
	GetRaw(key string) (*mvccpb.KeyValue, error)
	GetRawPrefix(prefix string) (map[string]*mvccpb.KeyValue, error)

	Put(key, value string) error
	PutUnderLease(key, value string) error
	PutAndDelete(map[string]*string) error
	PutAndDeleteUnderLease(map[string]*string) error

	Delete(key string) error
	DeletePrefix(prefix string) error

	Syncer() (cluster.Syncer, error)
}

Storage is the interface to contain storage APIs.

func NewStorage

func NewStorage(name string, cls cluster.Cluster) Storage

NewStorage creates a storage.

Jump to

Keyboard shortcuts

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