Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RunningPollers = struct { Workers map[string]*Worker mutex *sync.RWMutex }{ Workers: map[string]*Worker{}, // contains filtered or unexported fields } )
RunningPollers is the map of all runningPollers
Functions ¶
func ExecutionCleaner ¶
func ExecutionCleaner()
ExecutionCleaner is globale goroutine to remove all old polling traces
func TriggerPipeline ¶
func TriggerPipeline(tx *sql.Tx, rm *sdk.RepositoriesManager, poller *sdk.RepositoryPoller, e sdk.VCSPushEvent, projectData *sdk.Project) (bool, error)
TriggerPipeline linked to received hook
Types ¶
type Worker ¶
type Worker struct {
ProjectKey string `json:"project"`
}
Worker represent a goroutine for each project responsible of repo polling
type WorkerExecution ¶
type WorkerExecution struct { ID int64 `json:"id"` Project string `json:"project"` Application string `json:"application"` Pipeline string `json:"pipeline"` Execution time.Time `json:"execution"` Status string `json:"status"` Events []sdk.VCSPushEvent `json:"events,omitempty"` }
WorkerExecution represents a worker execution for a poller instance
func LoadExecutions ¶
func LoadExecutions(db database.QueryExecuter, project, application, pipeline string) ([]WorkerExecution, error)
LoadExecutions returns all executions in database
Click to show internal directories.
Click to hide internal directories.