Documentation ¶
Index ¶
- type SQLRegression2Store
- func (s *SQLRegression2Store) DeleteByCommit(ctx context.Context, num types.CommitNumber, tx pgx.Tx) error
- func (s *SQLRegression2Store) GetByIDs(ctx context.Context, ids []string) ([]*regression.Regression, error)
- func (s *SQLRegression2Store) GetNotificationId(ctx context.Context, commitNumber types.CommitNumber, alertID string) (string, error)
- func (s *SQLRegression2Store) GetOldestCommit(ctx context.Context) (*types.CommitNumber, error)
- func (s *SQLRegression2Store) GetRegressionsBySubName(ctx context.Context, sub_name string, limit int, offset int) ([]*regression.Regression, error)
- func (s *SQLRegression2Store) Range(ctx context.Context, begin, end types.CommitNumber) (map[types.CommitNumber]*regression.AllRegressionsForCommit, error)
- func (s *SQLRegression2Store) SetHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, ...) (bool, string, error)
- func (s *SQLRegression2Store) SetLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, ...) (bool, string, error)
- func (s *SQLRegression2Store) TriageHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, ...) error
- func (s *SQLRegression2Store) TriageLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, ...) error
- func (s *SQLRegression2Store) Write(ctx context.Context, ...) error
- func (s *SQLRegression2Store) WriteRegression(ctx context.Context, regression *regression.Regression, tx pgx.Tx) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLRegression2Store ¶
type SQLRegression2Store struct {
// contains filtered or unexported fields
}
SQLRegressionStore implements the regression.Store interface.
func New ¶
func New(db pool.Pool, alertConfigProvider alerts.ConfigProvider) (*SQLRegression2Store, error)
New returns a new instance of SQLRegression2Store
func (*SQLRegression2Store) DeleteByCommit ¶
func (s *SQLRegression2Store) DeleteByCommit(ctx context.Context, num types.CommitNumber, tx pgx.Tx) error
DeleteByCommit implements the regression.Store interface. Deletes a regression via commit number.
func (*SQLRegression2Store) GetByIDs ¶
func (s *SQLRegression2Store) GetByIDs(ctx context.Context, ids []string) ([]*regression.Regression, error)
Get a list of regressions given a list of regression ids.
func (*SQLRegression2Store) GetNotificationId ¶
func (s *SQLRegression2Store) GetNotificationId(ctx context.Context, commitNumber types.CommitNumber, alertID string) (string, error)
No Op for SQLRegression2Store.
func (*SQLRegression2Store) GetOldestCommit ¶
func (s *SQLRegression2Store) GetOldestCommit(ctx context.Context) (*types.CommitNumber, error)
GetOldestCommit implements regression.Store interface
func (*SQLRegression2Store) GetRegressionsBySubName ¶
func (s *SQLRegression2Store) GetRegressionsBySubName(ctx context.Context, sub_name string, limit int, offset int) ([]*regression.Regression, error)
Given the subscription name GetRegressionsBySubName gets all the regressions against the specified subscription. The response will be paginated according to the provided limit and offset.
func (*SQLRegression2Store) Range ¶
func (s *SQLRegression2Store) Range(ctx context.Context, begin, end types.CommitNumber) (map[types.CommitNumber]*regression.AllRegressionsForCommit, error)
Range implements the regression.Store interface.
func (*SQLRegression2Store) SetHigh ¶
func (s *SQLRegression2Store) SetHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, df *frame.FrameResponse, high *clustering2.ClusterSummary) (bool, string, error)
SetHigh implements the regression.Store interface.
func (*SQLRegression2Store) SetLow ¶
func (s *SQLRegression2Store) SetLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, df *frame.FrameResponse, low *clustering2.ClusterSummary) (bool, string, error)
SetLow implements the regression.Store interface.
func (*SQLRegression2Store) TriageHigh ¶
func (s *SQLRegression2Store) TriageHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error
TriageHigh implements the regression.Store interface.
func (*SQLRegression2Store) TriageLow ¶
func (s *SQLRegression2Store) TriageLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error
TriageLow implements the regression.Store interface.
func (*SQLRegression2Store) Write ¶
func (s *SQLRegression2Store) Write(ctx context.Context, regressions map[types.CommitNumber]*regression.AllRegressionsForCommit) error
Write implements the regression.Store interface.
func (*SQLRegression2Store) WriteRegression ¶
func (s *SQLRegression2Store) WriteRegression(ctx context.Context, regression *regression.Regression, tx pgx.Tx) (string, error)
WriteRegression writes a single regression object into the table and returns the Id of the written row.