Documentation ¶
Index ¶
- func ClientBaseURL(baseURL string) func(dc *DefaultClient)
- func ClientHTTPClientFactory(factory HTTPClientFactory) func(dc *DefaultClient)
- func DefaultHTTPClientFactory() *http.Client
- func UpsertCanaryConfigs(d *DefaultClient, application string, cc CanaryConfig) (string, error)
- type AccountCredential
- type AnalysisConfiguration
- type CanaryAnalysisExecutionResult
- type CanaryClassifier
- type CanaryConfig
- type CanaryConfigAPI
- type CanaryExecutionResult
- type Client
- type CredentialsAPI
- type DefaultClient
- func (d *DefaultClient) CreateCanaryConfig(cc CanaryConfig) (string, error)
- func (d *DefaultClient) GetCanaryConfigs(application string) ([]CanaryConfig, error)
- func (d *DefaultClient) GetCredentials() ([]AccountCredential, error)
- func (d *DefaultClient) GetStandaloneCanaryAnalysis(id string) (GetStandaloneCanaryAnalysisOutput, error)
- func (d *DefaultClient) StartStandaloneCanaryAnalysis(input StandaloneCanaryAnalysisInput) (StandaloneCanaryAnalysisOutput, error)
- func (d *DefaultClient) UpdateCanaryConfig(cc CanaryConfig) (string, error)
- type ExecutionRequest
- type GetStandaloneCanaryAnalysisOutput
- type HTTPClientFactory
- type JudgeConfig
- type JudgeResult
- type Metric
- type MetricGroup
- type Scope
- type ServerError
- type StageStatus
- type StandaloneCanaryAnalysisAPI
- type StandaloneCanaryAnalysisInput
- type StandaloneCanaryAnalysisOutput
- type Threshold
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientBaseURL ¶
func ClientBaseURL(baseURL string) func(dc *DefaultClient)
func ClientHTTPClientFactory ¶
func ClientHTTPClientFactory(factory HTTPClientFactory) func(dc *DefaultClient)
func UpsertCanaryConfigs ¶
func UpsertCanaryConfigs(d *DefaultClient, application string, cc CanaryConfig) (string, error)
UpsertCanaryConfigs adds additional logic around the Kayenta service since it does not allow for upserts
Types ¶
type AccountCredential ¶ added in v0.0.2
type AnalysisConfiguration ¶ added in v0.0.2
type AnalysisConfiguration map[string]interface{}
type CanaryAnalysisExecutionResult ¶
type CanaryAnalysisExecutionResult struct { DidPassThresholds bool `json:"didPassThresholds"` HasWarnings bool `json:"hasWarnings"` CanaryScoreMessage string `json:"canaryScoreMessage"` CanaryScores []float64 `json:"canaryScores"` CanaryExecutionResults []CanaryExecutionResult `json:"canaryExecutionResults"` }
type CanaryClassifier ¶
type CanaryConfig ¶
type CanaryConfig struct { Name string `json:"name"` Id string `json:"id"` Applications []string `json:"canaryConfig"` ConfigVersion string `json:"configVersion"` CreatedTimestamp int `json:"createdTimestamp"` Judge JudgeConfig `json:"judge"` Metrics []Metric `json:"metrics"` Classifier CanaryClassifier `json:"classifier"` }
type CanaryConfigAPI ¶
type CanaryConfigAPI interface { UpdateCanaryConfig(cc CanaryConfig) (string, error) CreateCanaryConfig(cc CanaryConfig) (string, error) GetCanaryConfigs(application string) ([]CanaryConfig, error) }
type CanaryExecutionResult ¶
type CanaryExecutionResult struct { Result struct { JudgeResult JudgeResult `json:"judgeResult"` CanaryDuration string `json:"canaryDuration"` } `json:"result"` }
type Client ¶
type Client interface { StandaloneCanaryAnalysisAPI CanaryConfigAPI CredentialsAPI }
type CredentialsAPI ¶ added in v0.0.2
type CredentialsAPI interface {
GetCredentials() []AccountCredential
}
type DefaultClient ¶
type DefaultClient struct { BaseURL string ClientFactory HTTPClientFactory }
func NewDefaultClient ¶
func NewDefaultClient(opts ...func(dc *DefaultClient)) *DefaultClient
func (*DefaultClient) CreateCanaryConfig ¶
func (d *DefaultClient) CreateCanaryConfig(cc CanaryConfig) (string, error)
CreateCanaryConfig writes a canary config to object storage
func (*DefaultClient) GetCanaryConfigs ¶
func (d *DefaultClient) GetCanaryConfigs(application string) ([]CanaryConfig, error)
GetCanaryConfigs gets a list of canary configs from the Kayenta server
func (*DefaultClient) GetCredentials ¶ added in v0.0.2
func (d *DefaultClient) GetCredentials() ([]AccountCredential, error)
func (*DefaultClient) GetStandaloneCanaryAnalysis ¶
func (d *DefaultClient) GetStandaloneCanaryAnalysis(id string) (GetStandaloneCanaryAnalysisOutput, error)
func (*DefaultClient) StartStandaloneCanaryAnalysis ¶
func (d *DefaultClient) StartStandaloneCanaryAnalysis(input StandaloneCanaryAnalysisInput) (StandaloneCanaryAnalysisOutput, error)
StartStandaloneCanaryAnalysis - starts a canary analysis
func (*DefaultClient) UpdateCanaryConfig ¶
func (d *DefaultClient) UpdateCanaryConfig(cc CanaryConfig) (string, error)
UpdateCanaryConfig updates an existing config
type ExecutionRequest ¶
type GetStandaloneCanaryAnalysisOutput ¶
type GetStandaloneCanaryAnalysisOutput struct { Status string `json:"status"` ExecutionStatus string `json:"executionStatus"` PipelineID string `json:"pipelineId"` Complete bool `json:"complete"` Stages []StageStatus `json:"stageStatus"` CanaryAnalysisExecutionResult CanaryAnalysisExecutionResult `json:"canaryAnalysisExecutionResult"` }
func (GetStandaloneCanaryAnalysisOutput) IsSuccessful ¶
func (g GetStandaloneCanaryAnalysisOutput) IsSuccessful() bool
type HTTPClientFactory ¶
HTTPClientFactory returns an http.Client that can be used to make requests and can be used to customize the client when needed
type JudgeConfig ¶
type JudgeConfig struct {
Name string `json:"name"`
}
type JudgeResult ¶
type JudgeResult struct { JudgeName string `json:"judgeName"` Results []struct { Name string `json:"name"` Classification string `json:"classification"` ClassificationReason string `json:"classificationReason"` Groups []string `json:"groups"` } `json:"results"` GroupScores []MetricGroup `json:"groupScores"` }
type MetricGroup ¶
type Scope ¶
type Scope struct { ScopeName string `json:"scopeName"` ControlScope string `json:"controlScope"` ControlLocation string `json:"controlLocation"` ControlOffsetInMinutes int `json:"controlOffsetInMinutes"` ExperimentScope string `json:"experimentScope"` ExperimentLocation string `json:"experimentLocation"` Step int `json:"step"` StartTimeIso string `json:"startTimeIso,omitempty"` EndTimeIso string `json:"endTimeIso,omitempty"` ExtendedScopeParams map[string]string `json:"extendedScopeParams"` }
type ServerError ¶
ServerError is returned whenever there is a problem
func (ServerError) Error ¶
func (e ServerError) Error() string
type StageStatus ¶
type StandaloneCanaryAnalysisAPI ¶
type StandaloneCanaryAnalysisAPI interface { StartStandaloneCanaryAnalysis(input StandaloneCanaryAnalysisInput) (StandaloneCanaryAnalysisOutput, error) GetStandaloneCanaryAnalysis(id string) (GetStandaloneCanaryAnalysisOutput, error) }
type StandaloneCanaryAnalysisInput ¶
type StandaloneCanaryAnalysisInput struct { // Optional query parameters User string `json:"-"` Application string `json:"-"` MetricsAccountName string `json:"-"` StorageAccountName string `json:"-"` // Request body CanaryConfig CanaryConfig `json:"canaryConfig"` ExecutionRequest ExecutionRequest `json:"executionRequest"` }
StandaloneCanaryAnalysisInput is used to create an api request to kayenta for a standalone analysis
type StandaloneCanaryAnalysisOutput ¶
type StandaloneCanaryAnalysisOutput struct {
CanaryAnalysisExecutionID string `json:"canaryAnalysisExecutionId"`
}
Click to show internal directories.
Click to hide internal directories.