function

package
v0.0.0-...-d691e2b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(cacheType CacheType, key string) string

func DefaultCacheExpirationConfigs

func DefaultCacheExpirationConfigs() map[CacheType]time.Duration

Types

type CacheType

type CacheType string
const (
	CacheTypeFunction CacheType = "function"
	CacheTypeAlias    CacheType = "alias"
	CacheTypeRuntime  CacheType = "runtime"
)

type DataStorer

type DataStorer interface {
	GetFunction(input *api.GetFunctionInput) (*api.GetFunctionOutput, bool, error)
	GetAlias(input *api.GetAliasInput) (*api.GetAliasOutput, bool, error)
	GetRuntimeConfiguration(input *api.GetRuntimeConfigurationInput) (*api.RuntimeConfiguration, bool, error)
}

DataStorer xxx

func NewDataStorer

func NewDataStorer(o *registry.Options, storageCache *StorageCache) (ds DataStorer, err error)

NewDataStorer create a apiserver client

type StorageCache

type StorageCache struct {
	*cache.Cache
	// contains filtered or unexported fields
}

func NewStorageCache

func NewStorageCache(expirationConfig map[CacheType]time.Duration) *StorageCache

func (*StorageCache) CacheExpiration

func (s *StorageCache) CacheExpiration(cacheType CacheType) time.Duration

type StorageCacheOptions

type StorageCacheOptions struct {
	CacheExpiration time.Duration
}

func NewStorageCacheOptions

func NewStorageCacheOptions() *StorageCacheOptions

func (*StorageCacheOptions) AddFlags

func (s *StorageCacheOptions) AddFlags(prefix string, fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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