reflector

package
v1.27.0-alpha.17 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiversionV2 = "v2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reflector

type Reflector interface {
	//list all namespace autoscaler
	ListAutoscalers() ([]*commtypes.BcsAutoscaler, error)

	// store autoscaler in zk
	StoreAutoscaler(autoscaler *commtypes.BcsAutoscaler) error

	// update autoscaler in zk
	UpdateAutoscaler(autoscaler *commtypes.BcsAutoscaler) error

	//fetch deployment info, if deployment status is not Running, then can't autoscale this deployment
	FetchDeploymentInfo(namespace, name string) (*schedtypes.Deployment, error)

	//fetch application info, if application status is not Running or Abnormal, then can't autoscale this application
	FetchApplicationInfo(namespace, name string) (*schedtypes.Application, error)

	//list selectorRef deployment taskgroup
	ListTaskgroupRefDeployment(namespace, name string) ([]*schedtypes.TaskGroup, error)

	//list selectorRef application taskgroup
	ListTaskgroupRefApplication(namespace, name string) ([]*schedtypes.TaskGroup, error)
}

Reflector watches a specified resource and causes all changes to be reflected in the given store.

func NewEtcdReflector

func NewEtcdReflector(conf *config.Config) Reflector

func NewZkReflector

func NewZkReflector(conf *config.Config) Reflector

Jump to

Keyboard shortcuts

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