Documentation ¶
Index ¶
- func GenerateRuncConfig(containerName string, hostname string, rootfs string) *configs.Config
- func StartEtcdServerBackgroundProcess(namespace string) error
- type Element
- type EtcdInstance
- func (inst *EtcdInstance) AddToGlobalQueue(j Job) (int64, error)
- func (inst *EtcdInstance) InitNode() (chan bool, error)
- func (inst *EtcdInstance) ObtainProcess(Uuid int64) (p *Process, err error)
- func (inst *EtcdInstance) QueueJobOnNode(hostID string, j *Job) error
- func (inst *EtcdInstance) StartProcess(j Job) (p Process, err error)
- func (inst *EtcdInstance) StopProcess(p Process) error
- type Job
- type Node
- type Process
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRuncConfig ¶
! Assemble and return a libcontainer config.
- @param string pseudo-random name of container
- @param string given hostname
- @param string rootfs *
- @return configs.Config libcontainer config
func StartEtcdServerBackgroundProcess ¶
! Function to start etcd in the background.
- @param string namespace *
- @return error error message, if any
Types ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
The element definition, which are individuals in the queue.
type EtcdInstance ¶
type EtcdInstance struct { // Client pointer to the server itself. Client *clientv3.Client // List of current processes. ProcessesList map[int64]*Process // contains filtered or unexported fields }
Etcd instance structure, which holds a pointer to the client and nodes.
func CreateEtcdInstance ¶
func CreateEtcdInstance(namespace string, rootfs string) (inst *EtcdInstance, err error)
! Creates a new EtcdInstance and returns a pointer to it.
- @param string network namespace
- @param string rootfs path *
- @return EtcdInstance pointer to the obj
- error message of the error, nil if none
func (*EtcdInstance) AddToGlobalQueue ¶
func (inst *EtcdInstance) AddToGlobalQueue(j Job) (int64, error)
! Add a job to the scheduler queue.
- @param Job given job *
- @return int64 Uuid
- @return error error message, if any
func (*EtcdInstance) InitNode ¶
func (inst *EtcdInstance) InitNode() (chan bool, error)
! Initialize the nodes.
- @return chan newly initialized node comm channel
- @return error error message, if any
func (*EtcdInstance) ObtainProcess ¶
func (inst *EtcdInstance) ObtainProcess(Uuid int64) (p *Process, err error)
! Grab the process from the global list of processes.
- @param int64 process Uuid *
- @return Process the process information
- @return error error message, if any
func (*EtcdInstance) QueueJobOnNode ¶
func (inst *EtcdInstance) QueueJobOnNode(hostID string, j *Job) error
! Hand the job off to the job list of a node.
- @param string host id
- @param Job given job to add to node
func (*EtcdInstance) StartProcess ¶
func (inst *EtcdInstance) StartProcess(j Job) (p Process, err error)
! Function to start a process, as per the global rootfs.
- @param Job given job
- @param string rootfs *
- @return Process newly generated process
- @return error error message, if any
func (*EtcdInstance) StopProcess ¶
func (inst *EtcdInstance) StopProcess(p Process) error
! Function to stop a process, as per the global rootfs.
- @param Process given process to stop *
- @return error error message, if any
type Process ¶
type Process struct { // Id generated via lcluster Uuid int64 Proc *libcontainer.Process // contains filtered or unexported fields }
The process definition.
Click to show internal directories.
Click to hide internal directories.