Documentation ¶
Index ¶
- type Controller
- func (e *Controller) CheckReadyState() bool
- func (e *Controller) CleanupNodes()
- func (e *Controller) CreateClient() bool
- func (e *Controller) CreateController()
- func (e *Controller) DeleteNode(nodeName string)
- func (e *Controller) GetK8NodeFromTask(task cfg.Command) corev1.Node
- func (e *Controller) GetTaskFromK8Node(node corev1.Node, kind string) cfg.Command
- func (e *Controller) GetTaskIDFromAnnotation(annotations map[string]string) string
- func (e *Controller) GetTaskIDFromLabel(labels map[string]string) string
- func (e *Controller) Init()
- func (e *Controller) SetSchedule()
- func (e *Controller) SetUnschedule()
- func (e *Controller) UnscheduleBeat()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Config *cfg.Config Framework *cfg.FrameworkConfig Redis *redis.Redis Client *kubernetes.Clientset Kubeconfig *rest.Config Mesos mesos.Mesos ReadyNodes int }
func New ¶
func New(cfg *cfg.Config, frm *cfg.FrameworkConfig) *Controller
New will create a new Controller object
func (*Controller) CleanupNodes ¶
func (e *Controller) CleanupNodes()
CleanupNodes will cleanup unready nodes
func (*Controller) CreateClient ¶
func (e *Controller) CreateClient() bool
func (*Controller) CreateController ¶
func (e *Controller) CreateController()
func (*Controller) DeleteNode ¶
func (e *Controller) DeleteNode(nodeName string)
func (*Controller) GetK8NodeFromTask ¶
func (e *Controller) GetK8NodeFromTask(task cfg.Command) corev1.Node
GetK8NodeFromTask will give out the K8 node from mesos task
func (*Controller) GetTaskFromK8Node ¶
GetTaskFromK8Node will give out the mesos task matched to the K8 node
func (*Controller) GetTaskIDFromAnnotation ¶
func (e *Controller) GetTaskIDFromAnnotation(annotations map[string]string) string
GetTaskIDFromAnnotation will return the Mesos Task ID in the annotation string
func (*Controller) GetTaskIDFromLabel ¶
func (e *Controller) GetTaskIDFromLabel(labels map[string]string) string
GetTaskIDFromLabel will return the Mesos Task ID in the label string
func (*Controller) Init ¶
func (e *Controller) Init()
func (*Controller) SetSchedule ¶
func (e *Controller) SetSchedule()
SetScheduled set all nodes to unscheduled.
func (*Controller) SetUnschedule ¶
func (e *Controller) SetUnschedule()
SetUnscheduled set all nodes to unscheduled.
func (*Controller) UnscheduleBeat ¶
func (e *Controller) UnscheduleBeat()
UnscheduleBeat - call the (un)scheduler function
Click to show internal directories.
Click to hide internal directories.