Documentation ¶
Index ¶
- Constants
- func MakeContainer(ctx context.Context, logger *zap.Logger, fissionClient *crd.FissionClient, ...) (executortype.ExecutorType, error)
- type Container
- func (caaf *Container) AdoptExistingResources(ctx context.Context)
- func (caaf *Container) CleanupOldExecutorObjects(ctx context.Context)
- func (caaf *Container) DeleteFuncSvcFromCache(ctx context.Context, fsvc *fscache.FuncSvc)
- func (caaf *Container) FuncInformerHandler(ctx context.Context) k8sCache.ResourceEventHandlerFuncs
- func (caaf *Container) GetFuncSvc(ctx context.Context, fn *fv1.Function) (*fscache.FuncSvc, error)
- func (caaf *Container) GetFuncSvcFromCache(ctx context.Context, fn *fv1.Function) (*fscache.FuncSvc, error)
- func (caaf *Container) GetFuncSvcFromPoolCache(ctx context.Context, fn *fv1.Function, requestsPerPod int) (*fscache.FuncSvc, int, error)
- func (caaf *Container) GetTotalAvailable(fn *fv1.Function) int
- func (caaf *Container) GetTypeName(ctx context.Context) fv1.ExecutorType
- func (caaf *Container) IsValid(ctx context.Context, fsvc *fscache.FuncSvc) bool
- func (caaf *Container) RefreshFuncPods(ctx context.Context, logger *zap.Logger, f fv1.Function) error
- func (caaf *Container) Run(ctx context.Context)
- func (caaf *Container) TapService(ctx context.Context, svcHost string) error
- func (caaf *Container) UnTapService(ctx context.Context, key string, svcHost string)
Constants ¶
const ( DeploymentKind = "Deployment" DeploymentVersion = "apps/v1" )
Variables ¶
This section is empty.
Functions ¶
func MakeContainer ¶
func MakeContainer( ctx context.Context, logger *zap.Logger, fissionClient *crd.FissionClient, kubernetesClient *kubernetes.Clientset, namespace string, instanceID string, funcInformer finformerv1.FunctionInformer, deplInformer appsinformers.DeploymentInformer, svcInformer coreinformers.ServiceInformer, ) (executortype.ExecutorType, error)
MakeContainer initializes and returns an instance of CaaF
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container represents an executor type
func (*Container) AdoptExistingResources ¶
AdoptExistingResources attempts to adopt resources for functions in all namespaces.
func (*Container) CleanupOldExecutorObjects ¶
CleanupOldExecutorObjects cleans orphaned resources.
func (*Container) DeleteFuncSvcFromCache ¶
DeleteFuncSvcFromCache deletes a function service from cache.
func (*Container) FuncInformerHandler ¶
func (caaf *Container) FuncInformerHandler(ctx context.Context) k8sCache.ResourceEventHandlerFuncs
func (*Container) GetFuncSvc ¶
GetFuncSvc returns a function service; error otherwise.
func (*Container) GetFuncSvcFromCache ¶
func (caaf *Container) GetFuncSvcFromCache(ctx context.Context, fn *fv1.Function) (*fscache.FuncSvc, error)
GetFuncSvcFromCache returns a function service from cache; error otherwise.
func (*Container) GetFuncSvcFromPoolCache ¶
func (caaf *Container) GetFuncSvcFromPoolCache(ctx context.Context, fn *fv1.Function, requestsPerPod int) (*fscache.FuncSvc, int, error)
GetFuncSvcFromPoolCache has not been implemented for Container Functions
func (*Container) GetTotalAvailable ¶
GetTotalAvailable has not been implemented for CaaF.
func (*Container) GetTypeName ¶
func (caaf *Container) GetTypeName(ctx context.Context) fv1.ExecutorType
GetTypeName returns the executor type name.
func (*Container) IsValid ¶
IsValid does a get on the service address to ensure it's a valid service, then scale deployment to 1 replica if there are no available replicas for function. Return true if no error occurs, return false otherwise.
func (*Container) RefreshFuncPods ¶
func (caaf *Container) RefreshFuncPods(ctx context.Context, logger *zap.Logger, f fv1.Function) error
RefreshFuncPods deletes pods related to the function so that new pods are replenished
func (*Container) TapService ¶
TapService makes a TouchByAddress request to the cache.