Documentation ¶
Index ¶
- Constants
- Variables
- func BoolPtr(in bool) *bool
- func Merge(c, patch api.Config) api.Config
- type ConfigManager
- type Kubescaler
- func (s *Kubescaler) CreateWorker(ctx context.Context, mtype string) (*api.Worker, error)
- func (s *Kubescaler) DeleteWorker(ctx context.Context, nodeName, id string) (*api.Worker, error)
- func (s *Kubescaler) GetConfig() api.Config
- func (s *Kubescaler) GetWorker(ctx context.Context, id string) (*api.Worker, error)
- func (s *Kubescaler) IsReady() bool
- func (s *Kubescaler) ListWorkers(ctx context.Context) (*api.WorkerList, error)
- func (s *Kubescaler) MachineTypes() []*provider.MachineType
- func (s *Kubescaler) PatchConfig(conf api.Config) error
- func (s *Kubescaler) ReserveWorker(ctx context.Context, worker *api.Worker) (*api.Worker, error)
- func (s *Kubescaler) Run() error
- func (s *Kubescaler) RunOnce(currentTime time.Time) error
- func (s *Kubescaler) SetConfig(conf api.Config) error
- func (s *Kubescaler) Stop(ctx context.Context) error
- type ListerRegistry
- type Options
Constants ¶
View Source
const (
DefaultConfigFilepath = "/etc/kubescaler.conf"
)
View Source
const (
EnvPrefix = "CAPACITY"
)
Variables ¶
View Source
var ( ErrNoAllowedMachines = errors.New("no allowed machines were provided") ErrNotConfigured = errors.New("worker manager is not configured properly") DefaultScanInterval = time.Second * 20 DefaultMaxMachineProvisionTime = time.Minute * 10 )
View Source
var ErrNoResourcesRequested = errors.New("empty cpu and RAM value")
Functions ¶
Types ¶
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigManager ¶
func NewConfigManager(file persistentfile.Interface) (*ConfigManager, error)
func (*ConfigManager) GetConfig ¶
func (m *ConfigManager) GetConfig() api.Config
func (*ConfigManager) PatchConfig ¶
func (m *ConfigManager) PatchConfig(in api.Config) error
type Kubescaler ¶
type Kubescaler struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts Options) (*Kubescaler, error)
func (*Kubescaler) CreateWorker ¶
func (*Kubescaler) DeleteWorker ¶
func (*Kubescaler) GetConfig ¶
func (s *Kubescaler) GetConfig() api.Config
func (*Kubescaler) IsReady ¶
func (s *Kubescaler) IsReady() bool
func (*Kubescaler) ListWorkers ¶
func (s *Kubescaler) ListWorkers(ctx context.Context) (*api.WorkerList, error)
func (*Kubescaler) MachineTypes ¶
func (s *Kubescaler) MachineTypes() []*provider.MachineType
func (*Kubescaler) PatchConfig ¶
func (s *Kubescaler) PatchConfig(conf api.Config) error
func (*Kubescaler) ReserveWorker ¶
func (*Kubescaler) Run ¶
func (s *Kubescaler) Run() error
type ListerRegistry ¶
Click to show internal directories.
Click to hide internal directories.