Documentation ¶
Index ¶
- Constants
- type EventStream
- type Registry
- func (r *Registry) CreateJob(j *job.Job) (err error)
- func (r *Registry) CreateJobOffer(jo *job.JobOffer)
- func (r *Registry) CreatePayload(jp *job.JobPayload) error
- func (r *Registry) CreateSignatureSet(s *sign.SignatureSet) error
- func (r *Registry) DestroyPayload(payloadName string)
- func (r *Registry) DestroySignatureSet(tag string)
- func (r *Registry) DestroySignatureSetOfPayload(name string)
- func (r *Registry) GetActiveMachines() []machine.MachineState
- func (r *Registry) GetAllJobs() []job.Job
- func (r *Registry) GetAllJobsByMachine(machBootID string) []job.Job
- func (r *Registry) GetAllPayloads() []job.JobPayload
- func (r *Registry) GetDebugInfo() (string, error)
- func (r *Registry) GetJob(jobName string) *job.Job
- func (r *Registry) GetJobState(jobName string) *job.JobState
- func (r *Registry) GetJobTarget(jobName string) *machine.MachineState
- func (r *Registry) GetMachineState(bootid string) *machine.MachineState
- func (r *Registry) GetPayload(payloadName string) *job.JobPayload
- func (r *Registry) GetSignatureSet(tag string) *sign.SignatureSet
- func (r *Registry) GetSignatureSetOfPayload(name string) *sign.SignatureSet
- func (r *Registry) JobScheduled(jobName string) bool
- func (r *Registry) LockJob(jobName, context string) *TimedResourceMutex
- func (r *Registry) LockJobOffer(jobName, context string) *TimedResourceMutex
- func (r *Registry) LockMachine(machBootID, context string) *TimedResourceMutex
- func (r *Registry) RemoveJobState(jobName string) error
- func (r *Registry) RemoveMachineState(machBootID string) error
- func (r *Registry) ResolveJobOffer(jobName string) error
- func (r *Registry) SaveJobState(jobName string, jobState *job.JobState)
- func (r *Registry) ScheduleJob(jobName string, machBootID string) error
- func (r *Registry) SetMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error)
- func (r *Registry) StopJob(jobName string)
- func (r *Registry) SubmitJobBid(jb *job.JobBid)
- func (r *Registry) UnresolvedJobOffers() []job.JobOffer
- func (r *Registry) UnscheduleJob(jobName string)
- type TimedResourceMutex
Constants ¶
View Source
const (
// ResourceMutexTTL is the number of seconds to allow a mutex to be held on a resource
ResourceMutexTTL = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStream ¶
type EventStream struct {
// contains filtered or unexported fields
}
func NewEventStream ¶
func NewEventStream(client *etcd.Client, registry *Registry) *EventStream
func (*EventStream) Close ¶
func (self *EventStream) Close()
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) CreateJobOffer ¶
func (*Registry) CreatePayload ¶
func (r *Registry) CreatePayload(jp *job.JobPayload) error
func (*Registry) CreateSignatureSet ¶ added in v0.2.0
func (r *Registry) CreateSignatureSet(s *sign.SignatureSet) error
func (*Registry) DestroyPayload ¶
func (*Registry) DestroySignatureSet ¶ added in v0.2.0
func (*Registry) DestroySignatureSetOfPayload ¶ added in v0.2.0
func (*Registry) GetActiveMachines ¶
func (r *Registry) GetActiveMachines() []machine.MachineState
Describe all active Machines
func (*Registry) GetAllJobs ¶
List the jobs all Machines are scheduled to run
func (*Registry) GetAllJobsByMachine ¶
func (*Registry) GetAllPayloads ¶
func (r *Registry) GetAllPayloads() []job.JobPayload
func (*Registry) GetDebugInfo ¶ added in v0.2.0
func (*Registry) GetJobState ¶
Get the current JobState of the provided Job
func (*Registry) GetJobTarget ¶
func (r *Registry) GetJobTarget(jobName string) *machine.MachineState
func (*Registry) GetMachineState ¶
func (r *Registry) GetMachineState(bootid string) *machine.MachineState
Get Machine object from etcd
func (*Registry) GetPayload ¶
func (r *Registry) GetPayload(payloadName string) *job.JobPayload
func (*Registry) GetSignatureSet ¶ added in v0.2.0
func (r *Registry) GetSignatureSet(tag string) *sign.SignatureSet
func (*Registry) GetSignatureSetOfPayload ¶ added in v0.2.0
func (r *Registry) GetSignatureSetOfPayload(name string) *sign.SignatureSet
func (*Registry) JobScheduled ¶ added in v0.2.0
func (*Registry) LockJob ¶ added in v0.1.2
func (r *Registry) LockJob(jobName, context string) *TimedResourceMutex
func (*Registry) LockJobOffer ¶ added in v0.1.2
func (r *Registry) LockJobOffer(jobName, context string) *TimedResourceMutex
func (*Registry) LockMachine ¶ added in v0.1.2
func (r *Registry) LockMachine(machBootID, context string) *TimedResourceMutex
Attempt to acquire a lock on a given machine for a given amount of time
func (*Registry) RemoveJobState ¶
Delete the state from the Registry for the given Job
func (*Registry) RemoveMachineState ¶
Remove Machine object from etcd
func (*Registry) ResolveJobOffer ¶
func (*Registry) SaveJobState ¶
Persist the changes in a provided Machine's Job to etcd with the provided TTL
func (*Registry) ScheduleJob ¶
func (*Registry) SetMachineState ¶
Push Machine object to etcd
func (*Registry) SubmitJobBid ¶
func (*Registry) UnresolvedJobOffers ¶
func (*Registry) UnscheduleJob ¶
type TimedResourceMutex ¶ added in v0.1.2
type TimedResourceMutex struct {
// contains filtered or unexported fields
}
TimedResourceMutex is a proxy to an auto-expiring mutex stored in the Registry. It assumes the mutex creator has initialized a timer.
func (*TimedResourceMutex) Unlock ¶ added in v0.1.2
func (t *TimedResourceMutex) Unlock() error
Unlock will attempt to remove the lock held on the mutex in the Registry.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.