Documentation ¶
Index ¶
- Constants
- Variables
- func CountMigrationTx(tx *sqlx.Tx, count *int) error
- func CreateMigration(tx *sqlx.Tx) (sql.Result, error)
- func DeleteRunsTx(tx *sqlx.Tx, deleteRunsQuery *api.DeleteQuery) error
- func GetMigration(tx *sqlx.Tx, version *int) error
- func GetRunAndStepUUIDByLabelTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, label string, ...) (api.RunRecord, uuid.UUID, api.Context, error)
- func GetRunLabelAndContextByStepUUIDTx(tx *sqlx.Tx, options api.Options, stepUUID uuid.UUID, ...) (api.RunRecord, api.Context, string, error)
- func GetRunsTx(tx *sqlx.Tx, getQuery *api.GetRunsQuery) ([]api.RunRecord, error)
- func GetStepByLabelTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, label string, ...) (api.StepRecord, error)
- func GetStepTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, index int, ...) (api.StepRecord, error)
- func GetStepsTx(tx *sqlx.Tx, getQuery *api.GetStepsQuery) ([]api.StepRecord, error)
- func InitLogrus(out io.Writer, level log.Level)
- func ListRunsTx(tx *sqlx.Tx, query *api.ListQuery) ([]api.RunRecord, *api.RangeResult, error)
- func ListStepsTx(tx *sqlx.Tx, query *api.ListQuery) ([]api.StepRecord, *api.RangeResult, error)
- func ResetRunCompleteByTx(tx *sqlx.Tx, id uuid.UUID)
- func UpdateMigration(tx *sqlx.Tx, version int) (sql.Result, error)
- type DAO
- func (d *DAO) Transactional(transactionalFunction func(tx *sqlx.Tx) error) (err error)
- func (d *DAO) UpdateManyStatusAndHeartBeatByLabelTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, labels []string, ...) []UUIDAndStatusOwner
- func (d *DAO) UpdateManyStatusAndHeartBeatByUUIDTx(tx *sqlx.Tx, options api.Options, uuids []uuid.UUID, ...) []UUIDAndStatusOwner
- func (d *DAO) UpdateManyStepsPartsBeatTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, indices []int, ...) []UUIDAndStatusOwner
- func (d *DAO) UpdateRunStatusTx(tx *sqlx.Tx, options api.Options, id uuid.UUID, newStatus api.RunStatusType, ...)
- func (d *DAO) UpdateStepHeartBeat(options api.Options, stepUUID uuid.UUID, statusOwner string) error
- func (d *DAO) UpdateStepPartsTx(tx *sqlx.Tx, options api.Options, runId uuid.UUID, index int, ...) UUIDAndStatusOwner
- type DBI
- type IdAndGroupId
- type ParametersType
- type PostgreSQLSqlxDB
- func (db *PostgreSQLSqlxDB) CreateRunTx(tx *sqlx.Tx, runRecord interface{}, completeBy int64)
- func (db *PostgreSQLSqlxDB) CreateStepTx(tx *sqlx.Tx, stepRecord *api.StepRecord)
- func (db *PostgreSQLSqlxDB) GetAndUpdateExpiredRuns(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []IdAndGroupId
- func (db *PostgreSQLSqlxDB) Migrate0(tx *sqlx.Tx) error
- func (db *PostgreSQLSqlxDB) Notify(tx *sqlx.Tx, channel string, message string)
- func (db *PostgreSQLSqlxDB) RecoverSteps(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []UUIDAndGroupId
- func (db *PostgreSQLSqlxDB) SQL() *sqlx.DB
- func (db *PostgreSQLSqlxDB) VerifyDBCreation(tx *sqlx.Tx) error
- type Sqlite3SqlxDB
- func (db *Sqlite3SqlxDB) CreateRunTx(tx *sqlx.Tx, runRecord interface{}, completeBy int64)
- func (db *Sqlite3SqlxDB) CreateStepTx(tx *sqlx.Tx, stepRecord *api.StepRecord)
- func (db *Sqlite3SqlxDB) GetAndUpdateExpiredRuns(DAO *DAO, tx *sqlx.Tx, _ int, _ bool) []IdAndGroupId
- func (db *Sqlite3SqlxDB) Migrate0(tx *sqlx.Tx) error
- func (db *Sqlite3SqlxDB) Notify(_ *sqlx.Tx, _ string, _ string)
- func (db *Sqlite3SqlxDB) RecoverSteps(DAO *DAO, tx *sqlx.Tx, _ int, _ bool) []UUIDAndGroupId
- func (db *Sqlite3SqlxDB) SQL() *sqlx.DB
- func (db *Sqlite3SqlxDB) VerifyDBCreation(tx *sqlx.Tx) error
- type UUIDAndGroupId
- type UUIDAndStatusOwner
Constants ¶
View Source
const ( Id = "id" RunId = "run-id" Key = "key" Template = "template" TemplateVersion = "template-version" TemplateTitle = "template-title" Status = "status" Index = "index" RetriesLeft = "retries-left" CreatedAt = "created-at" UUID = "uuid" StatusOwner = "status-owner" HeartBeat = "heartbeat" CompleteBy = "complete-by" Now = "now" State = "state" Label = "label" Name = "name" Tags = "tags" )
Variables ¶
View Source
var GitCommit string
View Source
var IsRemote = false
Functions ¶
func DeleteRunsTx ¶
func DeleteRunsTx(tx *sqlx.Tx, deleteRunsQuery *api.DeleteQuery) error
func GetStepByLabelTx ¶
func GetStepsTx ¶
func GetStepsTx(tx *sqlx.Tx, getQuery *api.GetStepsQuery) ([]api.StepRecord, error)
func ListRunsTx ¶
func ListStepsTx ¶
func ListStepsTx(tx *sqlx.Tx, query *api.ListQuery) ([]api.StepRecord, *api.RangeResult, error)
Types ¶
type DAO ¶
type DAO struct { Parameters ParametersType CompleteByPendingInterval int64 MaxOpenConnections int MaxIdleConnections int ConnectionMaxIdleTimeSeconds int64 ConnectionMaxLifeTimeSeconds int64 DB DBI }
func New ¶
func New(parameters *ParametersType) (*DAO, error)
func (*DAO) Transactional ¶
func (*DAO) UpdateManyStatusAndHeartBeatByLabelTx ¶
func (*DAO) UpdateManyStatusAndHeartBeatByUUIDTx ¶
func (*DAO) UpdateManyStepsPartsBeatTx ¶
func (*DAO) UpdateRunStatusTx ¶
func (*DAO) UpdateStepHeartBeat ¶
type DBI ¶
type DBI interface { SQL() *sqlx.DB VerifyDBCreation(tx *sqlx.Tx) error CreateStepTx(tx *sqlx.Tx, stepRecord *api.StepRecord) CreateRunTx(tx *sqlx.Tx, runRecord interface{}, completeBy int64) Migrate0(tx *sqlx.Tx) error RecoverSteps(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []UUIDAndGroupId GetAndUpdateExpiredRuns(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []IdAndGroupId Notify(tx *sqlx.Tx, channel string, message string) // contains filtered or unexported methods }
type IdAndGroupId ¶
type ParametersType ¶
type PostgreSQLSqlxDB ¶
func (*PostgreSQLSqlxDB) CreateRunTx ¶
func (db *PostgreSQLSqlxDB) CreateRunTx(tx *sqlx.Tx, runRecord interface{}, completeBy int64)
func (*PostgreSQLSqlxDB) CreateStepTx ¶
func (db *PostgreSQLSqlxDB) CreateStepTx(tx *sqlx.Tx, stepRecord *api.StepRecord)
func (*PostgreSQLSqlxDB) GetAndUpdateExpiredRuns ¶
func (db *PostgreSQLSqlxDB) GetAndUpdateExpiredRuns(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []IdAndGroupId
func (*PostgreSQLSqlxDB) Notify ¶
func (db *PostgreSQLSqlxDB) Notify(tx *sqlx.Tx, channel string, message string)
func (*PostgreSQLSqlxDB) RecoverSteps ¶
func (db *PostgreSQLSqlxDB) RecoverSteps(DAO *DAO, tx *sqlx.Tx, limit int, disableSkipLocks bool) []UUIDAndGroupId
func (*PostgreSQLSqlxDB) SQL ¶
func (db *PostgreSQLSqlxDB) SQL() *sqlx.DB
func (*PostgreSQLSqlxDB) VerifyDBCreation ¶
func (db *PostgreSQLSqlxDB) VerifyDBCreation(tx *sqlx.Tx) error
type Sqlite3SqlxDB ¶
func (*Sqlite3SqlxDB) CreateRunTx ¶
func (db *Sqlite3SqlxDB) CreateRunTx(tx *sqlx.Tx, runRecord interface{}, completeBy int64)
func (*Sqlite3SqlxDB) CreateStepTx ¶
func (db *Sqlite3SqlxDB) CreateStepTx(tx *sqlx.Tx, stepRecord *api.StepRecord)
func (*Sqlite3SqlxDB) GetAndUpdateExpiredRuns ¶
func (db *Sqlite3SqlxDB) GetAndUpdateExpiredRuns(DAO *DAO, tx *sqlx.Tx, _ int, _ bool) []IdAndGroupId
func (*Sqlite3SqlxDB) RecoverSteps ¶
func (db *Sqlite3SqlxDB) RecoverSteps(DAO *DAO, tx *sqlx.Tx, _ int, _ bool) []UUIDAndGroupId
func (*Sqlite3SqlxDB) SQL ¶
func (db *Sqlite3SqlxDB) SQL() *sqlx.DB
func (*Sqlite3SqlxDB) VerifyDBCreation ¶
func (db *Sqlite3SqlxDB) VerifyDBCreation(tx *sqlx.Tx) error
type UUIDAndGroupId ¶
type UUIDAndStatusOwner ¶
Click to show internal directories.
Click to hide internal directories.