Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { // JobType is to select operation type that will be applied to repository JobType Type // Repository points to the repository that will be used for operation Repository *git.Repository // Options is a placeholder for operation options Options interface{} }
Job relates the type of the operation and the entity
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue holds the slice of Jobs
func CreateJobQueue ¶
func CreateJobQueue() (jq *Queue)
CreateJobQueue creates a jobqueue struct and initialize its slice then return its pointer
func (*Queue) IsInTheQueue ¶
func (jq *Queue) IsInTheQueue(r *git.Repository) (inTheQueue bool, j *Job)
IsInTheQueue function; since the job and entity is not tied with its own struct, this function returns true if that entity is in the queue along with the jobs type
func (*Queue) RemoveFromQueue ¶
func (jq *Queue) RemoveFromQueue(r *git.Repository) error
RemoveFromQueue deletes the given entity and its job from the queue TODO: it is not safe if the job has been started
func (*Queue) StartJobsAsync ¶
StartJobsAsync start he jobs in the queue asynchronously
Click to show internal directories.
Click to hide internal directories.