Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertNamedParams(sql string, namedArgs map[string]interface{}) (string, []interface{})
- func ConvertNamedParamsDebug(sql string, namedArgs map[string]interface{}) string
- func NewPostgresCache(pool *pgxpool.Pool) *postgresCache
- type Cache
- type Querier
- type QueryParams
- func (q QueryParams) ExecuteDetails(ctx context.Context, db Querier) ([]pkg.Timeseries, error)
- func (q QueryParams) ExecuteSummary(db Querier) (pkg.Checks, error)
- func (q QueryParams) GetEndTime() *time.Time
- func (q QueryParams) GetStartTime() *time.Time
- func (q QueryParams) GetWhereClause() (string, map[string]interface{}, error)
- func (q QueryParams) String() string
- func (q QueryParams) Validate() error
- type SummaryOptions
Constants ¶
View Source
const AllStatuses = -1
Variables ¶
View Source
var DefaultCacheCount int
View Source
var DefaultWindow string
View Source
var PostgresCache = &postgresCache{}
Functions ¶
func ConvertNamedParams ¶ added in v0.38.85
func ConvertNamedParamsDebug ¶ added in v0.38.85
func NewPostgresCache ¶ added in v0.38.70
Types ¶
type Cache ¶
type Cache interface { Add(check pkg.Check, status ...pkg.CheckStatus) GetDetails(checkkey string, time string) interface{} RemoveChecks(canary v1.Canary) Query(q QueryParams) (pkg.Checks, error) QueryStatus(q QueryParams) ([]pkg.Timeseries, error) RemoveCheckByKey(key string) }
type QueryParams ¶ added in v0.38.70
type QueryParams struct { Check string CanaryID string Start, End string Window string IncludeMessages bool IncludeDetails bool StatusCount int Labels map[string]string Trace bool WindowDuration time.Duration // contains filtered or unexported fields }
func ParseQuery ¶ added in v0.38.70
func ParseQuery(c echo.Context) (*QueryParams, error)
func (QueryParams) ExecuteDetails ¶ added in v0.38.70
func (q QueryParams) ExecuteDetails(ctx context.Context, db Querier) ([]pkg.Timeseries, error)
func (QueryParams) ExecuteSummary ¶ added in v0.38.70
func (q QueryParams) ExecuteSummary(db Querier) (pkg.Checks, error)
func (QueryParams) GetEndTime ¶ added in v0.38.70
func (q QueryParams) GetEndTime() *time.Time
func (QueryParams) GetStartTime ¶ added in v0.38.70
func (q QueryParams) GetStartTime() *time.Time
func (QueryParams) GetWhereClause ¶ added in v0.38.70
func (q QueryParams) GetWhereClause() (string, map[string]interface{}, error)
func (QueryParams) String ¶ added in v0.38.70
func (q QueryParams) String() string
func (QueryParams) Validate ¶ added in v0.38.70
func (q QueryParams) Validate() error
type SummaryOptions ¶ added in v1.0.105
type SummaryOptions query.CheckSummaryOptions
Click to show internal directories.
Click to hide internal directories.