Documentation ¶
Index ¶
- Constants
- Variables
- func ArtifactsByCheck(ctx context.Context, checkID uuid.UUID, checkTime time.Time) ([]models.Artifact, error)
- func ArtifactsByPlaybookRun(ctx context.Context, runID uuid.UUID) ([]models.Artifact, error)
- func CheckSummary(ctx context.Context, opts ...CheckSummaryOptions) ([]models.CheckSummary, error)
- func CheckSummaryByID(ctx context.Context, checkID string) (*models.CheckSummary, error)
- func Config(ctx context.Context, sqlQuery string) ([]map[string]any, error)
- func FindAgent(ctx context.Context, name string) (*models.Agent, error)
- func FindComponentIDsByNameNamespaceType(ctx context.Context, namespace, name, componentType string) ([]uuid.UUID, error)
- func FindConfig(db *gorm.DB, config types.ConfigQuery) (*models.ConfigItem, error)
- func FindConfigForComponent(ctx context.Context, componentID, configType string) ([]models.ConfigItem, error)
- func FindConfigIDs(db *gorm.DB, config types.ConfigQuery) ([]uuid.UUID, error)
- func FindConfigIDsByNameNamespaceType(ctx context.Context, namespace, name, configType string) ([]uuid.UUID, error)
- func FindConfigs(db *gorm.DB, config types.ConfigQuery) ([]models.ConfigItem, error)
- func GetAllResourceIDsOfAgent(ctx context.Context, table, from string, size int, agentID uuid.UUID) ([]string, error)
- func GetComponent(ctx context.Context, id string) (*models.Component, error)
- type CheckQueryParams
- func (q CheckQueryParams) ExecuteDetails(ctx context.Context) ([]Timeseries, types.Uptime, types.Latency, error)
- func (q CheckQueryParams) GetEndTime() *time.Time
- func (q CheckQueryParams) GetStartTime() *time.Time
- func (q CheckQueryParams) GetWhereClause() (string, map[string]interface{}, error)
- func (q *CheckQueryParams) Init(queryParams url.Values) error
- func (q CheckQueryParams) String() string
- func (q *CheckQueryParams) Validate() error
- type CheckSummaryOptions
- type CheckSummarySortBy
- type Tags
- type Timeseries
- type TopologyOptions
- type TopologyQuerySortBy
- type TopologyResponse
Constants ¶
View Source
const DefaultDepth = 5
Variables ¶
View Source
var ( // Maximum number of past checks in the in-memory cache DefaultCacheCount = 5 // Default search window DefaultCheckQueryWindow = "1h" )
View Source
var DefaultQueryTimeout = 30 * time.Second
Functions ¶
func ArtifactsByCheck ¶ added in v1.0.225
func ArtifactsByPlaybookRun ¶ added in v1.0.225
func CheckSummary ¶
func CheckSummary(ctx context.Context, opts ...CheckSummaryOptions) ([]models.CheckSummary, error)
func CheckSummaryByID ¶
func FindComponentIDsByNameNamespaceType ¶ added in v1.0.236
func FindConfig ¶ added in v1.0.253
func FindConfig(db *gorm.DB, config types.ConfigQuery) (*models.ConfigItem, error)
func FindConfigForComponent ¶ added in v1.0.253
func FindConfigIDs ¶ added in v1.0.294
func FindConfigIDsByNameNamespaceType ¶ added in v1.0.236
func FindConfigs ¶ added in v1.0.254
func FindConfigs(db *gorm.DB, config types.ConfigQuery) ([]models.ConfigItem, error)
func GetAllResourceIDsOfAgent ¶ added in v1.0.274
Types ¶
type CheckQueryParams ¶ added in v1.0.260
type CheckQueryParams struct { Check string CanaryID string Start, End string IncludeMessages bool IncludeDetails bool StatusCount int Labels map[string]string Trace bool WindowDuration time.Duration // contains filtered or unexported fields }
func (CheckQueryParams) ExecuteDetails ¶ added in v1.0.260
func (q CheckQueryParams) ExecuteDetails(ctx context.Context) ([]Timeseries, types.Uptime, types.Latency, error)
func (CheckQueryParams) GetEndTime ¶ added in v1.0.260
func (q CheckQueryParams) GetEndTime() *time.Time
func (CheckQueryParams) GetStartTime ¶ added in v1.0.260
func (q CheckQueryParams) GetStartTime() *time.Time
func (CheckQueryParams) GetWhereClause ¶ added in v1.0.260
func (q CheckQueryParams) GetWhereClause() (string, map[string]interface{}, error)
func (*CheckQueryParams) Init ¶ added in v1.0.260
func (q *CheckQueryParams) Init(queryParams url.Values) error
func (CheckQueryParams) String ¶ added in v1.0.260
func (q CheckQueryParams) String() string
func (*CheckQueryParams) Validate ¶ added in v1.0.260
func (q *CheckQueryParams) Validate() error
type CheckSummaryOptions ¶
type CheckSummaryOptions struct { Timeout time.Duration CheckID *uuid.UUID SortBy CheckSummarySortBy DeleteFrom *time.Time // Labels apply to both the canary and check labels Labels map[string]string }
func OrderByName ¶
func OrderByName() CheckSummaryOptions
type CheckSummarySortBy ¶
type CheckSummarySortBy string
var CheckSummarySortByName CheckSummarySortBy = "name"
type Timeseries ¶ added in v1.0.260
type Timeseries struct { Key string `json:"key,omitempty"` Time string `json:"time,omitempty"` Status bool `json:"status,omitempty"` Message string `json:"message,omitempty"` Error string `json:"error,omitempty"` Duration int `json:"duration"` // Count is the number of times the check has been run in the specified time window Count int `json:"count,omitempty"` Passed int `json:"passed,omitempty"` Failed int `json:"failed,omitempty"` }
type TopologyOptions ¶
type TopologyOptions struct { ID string Owner string Labels map[string]string AgentID string Flatten bool Depth int // TODO: Filter status and types in DB Query Types []string Status []string SortBy TopologyQuerySortBy SortOrder string // contains filtered or unexported fields }
func (TopologyOptions) String ¶
func (opt TopologyOptions) String() string
type TopologyQuerySortBy ¶ added in v1.0.298
type TopologyQuerySortBy string
const ( TopologyQuerySortByName TopologyQuerySortBy = "name" TopologyQuerySortByField TopologyQuerySortBy = "field:" )
type TopologyResponse ¶
type TopologyResponse struct { Components models.Components `json:"components"` HealthStatuses []string `json:"healthStatuses"` Teams []string `json:"teams"` Tags Tags `json:"tags"` Types []string `json:"types"` }
func Topology ¶
func Topology(ctx context.Context, params TopologyOptions) (*TopologyResponse, error)
Click to show internal directories.
Click to hide internal directories.