Documentation ¶
Index ¶
- type ActiveRun
- type Artifact
- type Constraints
- type Docker
- type DockerParameter
- type JobHistory
- type Metronome
- func (c *Metronome) Cancel(ctx context.Context, spec interface{}) (interface{}, error)
- func (c *Metronome) CapacityInfo() apistructs.CapacityInfoData
- func (*Metronome) CleanUpBeforeDelete()
- func (c *Metronome) Create(ctx context.Context, specObj interface{}) (interface{}, error)
- func (c *Metronome) Destroy(ctx context.Context, specObj interface{}) error
- func (c *Metronome) Inspect(ctx context.Context, spec interface{}) (interface{}, error)
- func (*Metronome) JobVolumeCreate(ctx context.Context, spec interface{}) (string, error)
- func (*Metronome) KillPod(podname string) error
- func (c *Metronome) Kind() executortypes.Kind
- func (c *Metronome) Name() executortypes.Name
- func (m *Metronome) Precheck(ctx context.Context, specObj interface{}) (apistructs.ServiceGroupPrecheckData, error)
- func (c *Metronome) Remove(ctx context.Context, specObj interface{}) error
- func (m *Metronome) ResourceInfo(brief bool) (apistructs.ClusterResourceInfoData, error)
- func (*Metronome) Scale(ctx context.Context, spec interface{}) (interface{}, error)
- func (m *Metronome) SetNodeLabels(setting executortypes.NodeLabelSetting, hosts []string, ...) error
- func (c *Metronome) Status(ctx context.Context, specObj interface{}) (apistructs.StatusDesc, error)
- func (c *Metronome) Update(ctx context.Context, specObj interface{}) (interface{}, error)
- type MetronomeJob
- type MetronomeJobResult
- type Placement
- type Restart
- type Run
- type RunResult
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveRun ¶
type ActiveRun struct { ID string `json:"id,omitempty"` JobID string `json:"jobId,omitempty"` Status string `json:"status,omitempty"` }
ActiveRun metronome job activeRun struct, GET with "embed=activeRuns"
type Constraints ¶
type Docker ¶
type Docker struct { Image string `json:"image"` ForcePullImage bool `json:"forcePullImage,omitempty"` }
TODO: accomplish the fields
type DockerParameter ¶
type JobHistory ¶
type Metronome ¶
type Metronome struct {
// contains filtered or unexported fields
}
func (*Metronome) CapacityInfo ¶
func (c *Metronome) CapacityInfo() apistructs.CapacityInfoData
func (*Metronome) CleanUpBeforeDelete ¶
func (*Metronome) CleanUpBeforeDelete()
func (*Metronome) JobVolumeCreate ¶
func (*Metronome) Kind ¶
func (c *Metronome) Kind() executortypes.Kind
func (*Metronome) Name ¶
func (c *Metronome) Name() executortypes.Name
func (*Metronome) Precheck ¶
func (m *Metronome) Precheck(ctx context.Context, specObj interface{}) (apistructs.ServiceGroupPrecheckData, error)
func (*Metronome) Remove ¶
Attention: DO NOT delete Metronome job that had active runs in it, if DELETE a metronome with active runs, there would be a 409 Error, with following info: "message":"There are active job runs. Override with stopCurrentJobRuns=true", Use DESTROY method instead
func (*Metronome) ResourceInfo ¶
func (m *Metronome) ResourceInfo(brief bool) (apistructs.ClusterResourceInfoData, error)
func (*Metronome) SetNodeLabels ¶
func (m *Metronome) SetNodeLabels(setting executortypes.NodeLabelSetting, hosts []string, labels map[string]string) error
func (*Metronome) Status ¶
func (c *Metronome) Status(ctx context.Context, specObj interface{}) (apistructs.StatusDesc, error)
type MetronomeJob ¶
type MetronomeJobResult ¶
type MetronomeJobResult struct { MetronomeJob ActiveRuns []ActiveRun `json:"activeRuns,omitempty"` History JobHistory `json:"history,omitempty"` }
MetronomeJobResult used when GET Metronome job with "embed=history&embed=activeRuns"
type Placement ¶
type Placement struct {
Constraints []Constraints `json:"constraints,omitempty"`
}
TODO: accomplish the fields
type Restart ¶
type Restart struct { Policy string `json:"policy,omitempty"` ActiveDeadlineSeconds int `json:"activeDeadlineSeconds,omitempty"` }
TODO: accomplish the fields
type Run ¶
type Run struct { Id string `json:"id,omitempty"` Artifacts []Artifact `json:"artifacts,omitempty"` Cmd string `json:"cmd,omitempty"` Cpus float64 `json:"cpus"` Mem float64 `json:"mem"` // "minimum": 32 Disk float64 `json:"disk"` Docker Docker `json:"docker,omitempty"` Env map[string]string `json:"env,omitempty"` MaxLaunchDelay int `json:"maxLaunchDelay,omitempty"` Placement *Placement `json:"placement,omitempty"` Restart Restart `json:"restart,omitempty"` //User string `json:"user,omitempty"` Volumes []Volume `json:"volumes,omitempty"` }
Click to show internal directories.
Click to hide internal directories.