Versions in this module Expand all Collapse all v1 v1.4.1 Feb 27, 2023 Changes in this version + const BUCKET_ACTIVE + const BUCKET_COLD + const BUCKET_EXPIRE + const DEP_STATUS_ACTIVATING + const DEP_STATUS_ACTIVE + const DEP_STATUS_POOLED + const IN_DEPLOYMENT_MIGRATION + var BucketFlushInactiveTimeout = time.Second + var ErrClusterClosed = errors.New("err cluster closed") + var ErrInsufficientDeployments = errors.New("insufficient lambda deployments") + var ErrInvalidInstance = errors.New("invalid instance") + var ErrNotActiveBucket = errors.New("scale out failed, not in active bucket") + var ErrOutOfBound = errors.New("instance is not active") + var ErrUnsupported = errors.New("unsupported") + var MaxBackingNodes = 5 + func CleanUpPool() + type Bucket struct + func (b *Bucket) AllInstancesStats() types.Iterator + func (b *Bucket) InstanceLen() int + func (b *Bucket) InstanceStats(idx int) types.InstanceStats + func (b *Bucket) InstanceStatsFromIterator(iter types.Iterator) (int, types.InstanceStats) + func (b *Bucket) MetaStats() types.MetaStoreStats + type BucketIndex struct + BucketId int + type Cluster interface + Close func() + CollectData func() + GetPlacer func() metastore.Placer + Start func() error + WaitReady func() + type DefaultGroupIndex int + func (i *DefaultGroupIndex) Next() DefaultGroupIndex + func (i *DefaultGroupIndex) NextN(n int) DefaultGroupIndex + func (i DefaultGroupIndex) Idx() int + type Group struct + func NewGroup(num int) *Group + func (g *Group) All() []*GroupInstance + func (g *Group) EndIndex() DefaultGroupIndex + func (g *Group) Expand(n int) (DefaultGroupIndex, error) + func (g *Group) Expire(n int) error + func (g *Group) Instance(idx GroupIndex) *lambdastore.Instance + func (g *Group) Len() int + func (g *Group) Reserve(idx GroupIndex, d types.LambdaDeployment) *GroupInstance + func (g *Group) Set(ins *GroupInstance) + func (g *Group) StartIndex() DefaultGroupIndex + func (g *Group) SubGroup(start GroupIndex, end GroupIndex) []*GroupInstance + func (g *Group) Swap(gins1 *GroupInstance, gins2 *GroupInstance) + type GroupIndex interface + Idx func() int + type GroupInstance struct + func (gins *GroupInstance) Idx() int + func (gins *GroupInstance) Instance() *lambdastore.Instance + func (gins *GroupInstance) IsRetired() bool + func (gins *GroupInstance) Retire() bool + type GroupInstanceEnumerator struct + func NewGroupInstanceEnumerator(ginstances []*GroupInstance) *GroupInstanceEnumerator + func (enum *GroupInstanceEnumerator) Instance(i int) *lambdastore.Instance + type MovingWindow struct + func NewMovingWindow(server ServerProvider) *MovingWindow + func NewMovingWindowWithOptions(server ServerProvider, numFuncSteps int) *MovingWindow + func (mw *MovingWindow) AllClustersStats() types.Iterator + func (mw *MovingWindow) Close() + func (mw *MovingWindow) ClusterLen() int + func (mw *MovingWindow) ClusterStats(idx int) types.ClusterStats + func (mw *MovingWindow) ClusterStatsFromIterator(iter types.Iterator) (int, types.ClusterStats) + func (mw *MovingWindow) CollectData() + func (mw *MovingWindow) Daemon() + func (mw *MovingWindow) DegradeCheck() int + func (mw *MovingWindow) ExpireCheck() int + func (mw *MovingWindow) GetActiveInstances(num int) lambdastore.InstanceEnumerator + func (mw *MovingWindow) GetBackupCandidates() mapreduce.Iterator + func (mw *MovingWindow) GetCurrentBucket() *Bucket + func (mw *MovingWindow) GetDelegates() []*lambdastore.Instance + func (mw *MovingWindow) GetPlacer() metastore.Placer + func (mw *MovingWindow) GetSlice(size int) metastore.Slice + func (mw *MovingWindow) Instance(id uint64) *lambdastore.Instance + func (mw *MovingWindow) LoadCandidates(queue *lambdastore.CandidateQueue, buf []*lambdastore.Instance) int + func (mw *MovingWindow) MetaStats() types.MetaStoreStats + func (mw *MovingWindow) Recycle(ins types.LambdaDeployment) error + func (mw *MovingWindow) Relocate(meta interface{}, chunkId int, cmd types.Command) (*lambdastore.Instance, error) + func (mw *MovingWindow) Rotate() (old *Bucket, inherited int, err error) + func (mw *MovingWindow) Start() error + func (mw *MovingWindow) Trigger(event int, args ...interface{}) + func (mw *MovingWindow) TryRelocate(meta interface{}, chunkId int, cmd types.Command) (*lambdastore.Instance, bool, error) + func (mw *MovingWindow) WaitReady() + type Pool struct + func NewPool(numCluster int, numDeployment int) *Pool + func (s *Pool) Clear(g *Group) + func (s *Pool) ClearAll() + func (s *Pool) Deployment(id uint64) (types.LambdaDeployment, bool) + func (s *Pool) GetDestination(lambdaId uint64) (types.LambdaDeployment, error) + func (s *Pool) GetForGroup(g *Group, idx GroupIndex) *GroupInstance + func (s *Pool) Instance(id uint64) *lambdastore.Instance + func (s *Pool) InstanceIndex(id uint64) (*GroupInstance, bool) + func (s *Pool) NumActives() int + func (s *Pool) NumAvailable() int + func (s *Pool) Recycle(dp types.LambdaDeployment) + func (s *Pool) ReserveForGroup(g *Group, idx GroupIndex) (*GroupInstance, error) + func (s *Pool) ReserveForInstance(insId uint64) (*GroupInstance, error) + func (s *Pool) StartMigrator(lambdaId uint64) (string, error) + type ServerProvider interface + GetPersistCache func() types.PersistCache + GetServePort func(uint64) int + type Slice struct + func NewSlice(size int, initializer SliceInitializer) *Slice + func (s *Slice) GetIndex(idx uint64) uint64 + func (s *Slice) Reset(size int) + func (s *Slice) Size() int + type SliceInitializer func(int) (int, int) + type StaticCluster struct + func NewStaticCluster(server ServerProvider, size int) *StaticCluster + func (c *StaticCluster) AllInstancesStats() types.Iterator + func (c *StaticCluster) Close() + func (c *StaticCluster) CollectData() + func (c *StaticCluster) GetActiveInstances(num int) lambdastore.InstanceEnumerator + func (c *StaticCluster) GetBackupCandidates() mapreduce.Iterator + func (c *StaticCluster) GetDelegates() []*lambdastore.Instance + func (c *StaticCluster) GetPlacer() metastore.Placer + func (c *StaticCluster) GetSlice(size int) metastore.Slice + func (c *StaticCluster) Instance(id uint64) *lambdastore.Instance + func (c *StaticCluster) InstanceLen() int + func (c *StaticCluster) InstanceStats(idx int) types.InstanceStats + func (c *StaticCluster) InstanceStatsFromIterator(iter types.Iterator) (int, types.InstanceStats) + func (c *StaticCluster) MetaStats() types.MetaStoreStats + func (c *StaticCluster) Recycle(ins types.LambdaDeployment) error + func (c *StaticCluster) Relocate(obj interface{}, chunk int, cmd types.Command) (*lambdastore.Instance, error) + func (c *StaticCluster) Start() error + func (c *StaticCluster) Trigger(event int, args ...interface{}) + func (c *StaticCluster) TryRelocate(o interface{}, chunkId int, cmd types.Command) (*lambdastore.Instance, bool, error) + func (c *StaticCluster) WaitReady()