Documentation ¶
Index ¶
- Constants
- type AggregateType
- type FromBuilder
- type GetJobRunErrorRepository
- type GetJobSpecRepository
- type GetJobsRepository
- type GetJobsResult
- type GroupByResult
- type GroupJobsRepository
- type JobOptions
- type JobSimulator
- func (js *JobSimulator) ApiJob() *api.Job
- func (js *JobSimulator) Build() *JobSimulator
- func (js *JobSimulator) Cancelled(timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Failed(node string, exitCode int32, message string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Job() *model.Job
- func (js *JobSimulator) LeaseExpired(timestamp time.Time) *JobSimulator
- func (js *JobSimulator) LeaseReturned(runId string, message string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Pending(runId string, cluster string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Reprioritized(newPriority uint32, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) RunFailed(runId string, node string, exitCode int32, message string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) RunSucceeded(runId string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) RunTerminated(runId string, cluster string, node string, message string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) RunUnschedulable(runId string, cluster string, node string, message string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Running(runId string, node string, timestamp time.Time) *JobSimulator
- func (js *JobSimulator) Submit(queue, jobSet, owner string, timestamp time.Time, opts *JobOptions) *JobSimulator
- func (js *JobSimulator) Succeeded(timestamp time.Time) *JobSimulator
- type JoinType
- type LookoutTables
- func (c *LookoutTables) ColumnFromField(field string) (string, error)
- func (c *LookoutTables) GroupAggregateForCol(col string) (AggregateType, error)
- func (c *LookoutTables) IsFilterable(col string) bool
- func (c *LookoutTables) IsGroupable(col string) bool
- func (c *LookoutTables) IsOrderable(col string) bool
- func (c *LookoutTables) SupportsMatch(col, match string) bool
- func (c *LookoutTables) TableAbbrev(table string) (string, error)
- func (c *LookoutTables) TablePrecedence() []string
- func (c *LookoutTables) TablesForColumn(col string) (map[string]bool, error)
- type Query
- type QueryBuilder
- func (qb *QueryBuilder) CountGroups(filters []*model.Filter, groupedField string) (*Query, error)
- func (qb *QueryBuilder) CreateTempTable() (*Query, string)
- func (qb *QueryBuilder) GroupBy(filters []*model.Filter, order *model.Order, groupedField string, ...) (*Query, error)
- func (qb *QueryBuilder) InsertIntoTempTable(tempTableName string, filters []*model.Filter, order *model.Order, ...) (*Query, error)
- func (qb *QueryBuilder) JobCount(filters []*model.Filter) (*Query, error)
- type SqlGetJobRunErrorRepository
- type SqlGetJobSpecRepository
- type SqlGetJobsRepository
- type SqlGroupJobsRepository
Constants ¶
View Source
const ( Unknown AggregateType = -1 Max = 0 Average = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateType ¶ added in v0.3.50
type AggregateType int
type FromBuilder ¶ added in v0.3.53
type FromBuilder struct {
// contains filtered or unexported fields
}
func NewFromBuilder ¶ added in v0.3.53
func NewFromBuilder(baseTable, baseTableAbbrev string) *FromBuilder
func (*FromBuilder) Build ¶ added in v0.3.53
func (b *FromBuilder) Build() string
func (*FromBuilder) Join ¶ added in v0.3.53
func (b *FromBuilder) Join(joinType JoinType, table, abbrev, on string) *FromBuilder
type GetJobSpecRepository ¶
type GetJobsRepository ¶
type GetJobsResult ¶
type GroupByResult ¶
type GroupJobsRepository ¶
type JobOptions ¶
type JobSimulator ¶
type JobSimulator struct {
// contains filtered or unexported fields
}
func NewJobSimulator ¶
func NewJobSimulator(converter *instructions.InstructionConverter, store *lookoutdb.LookoutDb) *JobSimulator
func (*JobSimulator) ApiJob ¶
func (js *JobSimulator) ApiJob() *api.Job
func (*JobSimulator) Build ¶
func (js *JobSimulator) Build() *JobSimulator
func (*JobSimulator) Cancelled ¶
func (js *JobSimulator) Cancelled(timestamp time.Time) *JobSimulator
func (*JobSimulator) Failed ¶
func (js *JobSimulator) Failed(node string, exitCode int32, message string, timestamp time.Time) *JobSimulator
func (*JobSimulator) Job ¶
func (js *JobSimulator) Job() *model.Job
func (*JobSimulator) LeaseExpired ¶
func (js *JobSimulator) LeaseExpired(timestamp time.Time) *JobSimulator
func (*JobSimulator) LeaseReturned ¶
func (js *JobSimulator) LeaseReturned(runId string, message string, timestamp time.Time) *JobSimulator
func (*JobSimulator) Pending ¶
func (js *JobSimulator) Pending(runId string, cluster string, timestamp time.Time) *JobSimulator
func (*JobSimulator) Reprioritized ¶
func (js *JobSimulator) Reprioritized(newPriority uint32, timestamp time.Time) *JobSimulator
func (*JobSimulator) RunFailed ¶
func (js *JobSimulator) RunFailed(runId string, node string, exitCode int32, message string, timestamp time.Time) *JobSimulator
func (*JobSimulator) RunSucceeded ¶
func (js *JobSimulator) RunSucceeded(runId string, timestamp time.Time) *JobSimulator
func (*JobSimulator) RunTerminated ¶
func (js *JobSimulator) RunTerminated(runId string, cluster string, node string, message string, timestamp time.Time) *JobSimulator
func (*JobSimulator) RunUnschedulable ¶
func (js *JobSimulator) RunUnschedulable(runId string, cluster string, node string, message string, timestamp time.Time) *JobSimulator
func (*JobSimulator) Running ¶
func (js *JobSimulator) Running(runId string, node string, timestamp time.Time) *JobSimulator
func (*JobSimulator) Submit ¶
func (js *JobSimulator) Submit(queue, jobSet, owner string, timestamp time.Time, opts *JobOptions) *JobSimulator
func (*JobSimulator) Succeeded ¶
func (js *JobSimulator) Succeeded(timestamp time.Time) *JobSimulator
type LookoutTables ¶
type LookoutTables struct {
// contains filtered or unexported fields
}
func NewTables ¶
func NewTables() *LookoutTables
func (*LookoutTables) ColumnFromField ¶
func (c *LookoutTables) ColumnFromField(field string) (string, error)
func (*LookoutTables) GroupAggregateForCol ¶ added in v0.3.50
func (c *LookoutTables) GroupAggregateForCol(col string) (AggregateType, error)
func (*LookoutTables) IsFilterable ¶
func (c *LookoutTables) IsFilterable(col string) bool
func (*LookoutTables) IsGroupable ¶
func (c *LookoutTables) IsGroupable(col string) bool
func (*LookoutTables) IsOrderable ¶
func (c *LookoutTables) IsOrderable(col string) bool
func (*LookoutTables) SupportsMatch ¶
func (c *LookoutTables) SupportsMatch(col, match string) bool
func (*LookoutTables) TableAbbrev ¶
func (c *LookoutTables) TableAbbrev(table string) (string, error)
func (*LookoutTables) TablePrecedence ¶
func (c *LookoutTables) TablePrecedence() []string
func (*LookoutTables) TablesForColumn ¶
func (c *LookoutTables) TablesForColumn(col string) (map[string]bool, error)
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
QueryBuilder is a struct responsible for building a single Lookout SQL query
func NewQueryBuilder ¶
func NewQueryBuilder(lookoutTables *LookoutTables) *QueryBuilder
func (*QueryBuilder) CountGroups ¶
CountGroups returns Query that counts the total number of groups created by grouping by groupedField and filtering with filters
func (*QueryBuilder) CreateTempTable ¶
func (qb *QueryBuilder) CreateTempTable() (*Query, string)
CreateTempTable creates a temporary table of job ids Returns the Query and the name of the temporary table, to be used later in InsertIntoTempTable
func (*QueryBuilder) GroupBy ¶
func (qb *QueryBuilder) GroupBy( filters []*model.Filter, order *model.Order, groupedField string, aggregates []string, skip int, take int, ) (*Query, error)
GroupBy returns Query that performs a group by on filters
func (*QueryBuilder) InsertIntoTempTable ¶
func (qb *QueryBuilder) InsertIntoTempTable(tempTableName string, filters []*model.Filter, order *model.Order, skip, take int) (*Query, error)
InsertIntoTempTable returns Query that returns Job IDs according to filters, order, skip and take, and inserts them in the temp table with name tempTableName
type SqlGetJobRunErrorRepository ¶
type SqlGetJobRunErrorRepository struct {
// contains filtered or unexported fields
}
func NewSqlGetJobRunErrorRepository ¶
func NewSqlGetJobRunErrorRepository(db *pgxpool.Pool, decompressor compress.Decompressor) *SqlGetJobRunErrorRepository
func (*SqlGetJobRunErrorRepository) GetJobRunError ¶
type SqlGetJobSpecRepository ¶
type SqlGetJobSpecRepository struct {
// contains filtered or unexported fields
}
func NewSqlGetJobSpecRepository ¶
func NewSqlGetJobSpecRepository(db *pgxpool.Pool, decompressor compress.Decompressor) *SqlGetJobSpecRepository
func (*SqlGetJobSpecRepository) GetJobSpec ¶
type SqlGetJobsRepository ¶
type SqlGetJobsRepository struct {
// contains filtered or unexported fields
}
func NewSqlGetJobsRepository ¶
func NewSqlGetJobsRepository(db *pgxpool.Pool) *SqlGetJobsRepository
type SqlGroupJobsRepository ¶
type SqlGroupJobsRepository struct {
// contains filtered or unexported fields
}
func NewSqlGroupJobsRepository ¶
func NewSqlGroupJobsRepository(db *pgxpool.Pool) *SqlGroupJobsRepository
Click to show internal directories.
Click to hide internal directories.