Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller struct stores everything the controller needs in order to function. It contains the functions needed to populate and operate on the work queue. It also provides the relevant helper functions to resource and pod alive requests from the k8s scheduleri implementation. A controller is an active reconsiliation process that attempts operates on items in it's work queue.
func NewController ¶
func NewController( kubeclientset kubernetes.Interface, restconfig *rest.Config, libclient *client.Kubernetesp, kubeInformerFactory kubeinformers.SharedInformerFactory, opts ScheduleOpts, ) *Controller
NewController returns a new scheduler controller.
func (*Controller) Run ¶
func (c *Controller) Run(ctx context.Context, threadiness int, stopCh <-chan struct{}) error
Run sets up event handlers, syncs informer caches and starts workers. It blocks until stopCh is closed, at which point it'll shut down workqueue and wait for workers to finish processing. Threadiness determines how many workers, pod alive and req check handlers to run.
type Request ¶
type Request struct { RAM resource.Quantity Time time.Duration Cores resource.Quantity Disk resource.Quantity Other map[string]string CbChan chan Response }
Request contains relevant information for processing a request from reqCheck().
type ScheduleOpts ¶
type ScheduleOpts struct { Files []client.FilePair // Files to copy to each spawned runner. Potentially listen on a channel later. CbChan chan string // Channel to send errors on BadCbChan chan *cloud.Server // Send bad 'servers' back to wr. ReqChan chan *Request // Channel to send requests about resource availability to PodAliveChan chan *PodAlive // Channel to send PodAlive requests ManagerDir string // Directory to store logs in Logger log15.Logger }
ScheduleOpts stores options for the scheduler.