Documentation ¶
Index ¶
- Constants
- Variables
- func IsReserved(node *corev1.Node) bool
- type Manager
- func (m *Manager) CreateWorker(ctx context.Context, mtype string) (*api.Worker, error)
- func (m *Manager) DeleteWorker(ctx context.Context, nodeName, id string) (*api.Worker, error)
- func (m *Manager) GetWorker(ctx context.Context, id string) (*api.Worker, error)
- func (m *Manager) ListWorkers(ctx context.Context) (*api.WorkerList, error)
- func (m *Manager) MachineTypes() []*provider.MachineType
- func (m *Manager) ReserveWorker(ctx context.Context, want *api.Worker) (*api.Worker, error)
- type WInterface
Constants ¶
View Source
const ( LabelReserved = "capacity.supergiant.io/reserved" ValTrue = "true" ClusterRole = "worker" MinWorkerLifespan = time.Minute * 20 NodeStateReady = "ready" NodeStateUnknown = "unknown" )
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func IsReserved ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CreateWorker ¶
func (*Manager) DeleteWorker ¶
func (*Manager) ListWorkers ¶
func (*Manager) MachineTypes ¶
func (m *Manager) MachineTypes() []*provider.MachineType
type WInterface ¶
type WInterface interface { MachineTypes() []*provider.MachineType CreateWorker(ctx context.Context, mtype string) (*api.Worker, error) GetWorker(ctx context.Context, id string) (*api.Worker, error) ListWorkers(ctx context.Context) (*api.WorkerList, error) DeleteWorker(ctx context.Context, nodeName, id string) (*api.Worker, error) ReserveWorker(ctx context.Context, worker *api.Worker) (*api.Worker, error) }
Click to show internal directories.
Click to hide internal directories.