fscache

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TOUCH fscRequestType = iota
	LISTOLD
	LOG
)
View Source
const (
	POOLMGR executorType = iota
	NEWDEPLOY
)

Variables

This section is empty.

Functions

func IsNameExistError

func IsNameExistError(err error) bool

func IsNotFoundError

func IsNotFoundError(err error) bool

Types

type FuncSvc

type FuncSvc struct {
	Name              string                  // Name of object
	Function          *metav1.ObjectMeta      // function this pod/service is for
	Environment       *fv1.Environment        // function's environment
	Address           string                  // Host:Port or IP:Port that the function's service can be reached at.
	KubernetesObjects []apiv1.ObjectReference // Kubernetes Objects (within the function namespace)
	Executor          executorType

	Ctime time.Time
	Atime time.Time
}

type FunctionServiceCache

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

func MakeFunctionServiceCache

func MakeFunctionServiceCache(logger *zap.Logger) *FunctionServiceCache

func (*FunctionServiceCache) Add

func (fsc *FunctionServiceCache) Add(fsvc FuncSvc) (*FuncSvc, error)

func (*FunctionServiceCache) DeleteEntry

func (fsc *FunctionServiceCache) DeleteEntry(fsvc *FuncSvc)

func (*FunctionServiceCache) DeleteOld

func (fsc *FunctionServiceCache) DeleteOld(fsvc *FuncSvc, minAge time.Duration) (bool, error)

func (*FunctionServiceCache) GetByFunction

func (fsc *FunctionServiceCache) GetByFunction(m *metav1.ObjectMeta) (*FuncSvc, error)

func (*FunctionServiceCache) GetByFunctionUID

func (fsc *FunctionServiceCache) GetByFunctionUID(uid types.UID) (*FuncSvc, error)

func (*FunctionServiceCache) IncreaseColdStarts

func (fsc *FunctionServiceCache) IncreaseColdStarts(funcname, funcuid string)

func (*FunctionServiceCache) ListOld

func (fsc *FunctionServiceCache) ListOld(age time.Duration) ([]*FuncSvc, error)

func (*FunctionServiceCache) Log

func (fsc *FunctionServiceCache) Log()

func (*FunctionServiceCache) TouchByAddress

func (fsc *FunctionServiceCache) TouchByAddress(address string) error

Jump to

Keyboard shortcuts

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