Documentation ¶
Index ¶
- func BuildExecutionRequest(ctx ExecutionRequestContext) (*kayenta.ExecutionRequest, error)
- func BuildScope(control, experiment string) (*kayenta.Scope, error)
- func TableStatus(o kayenta.GetStandaloneCanaryAnalysisOutput) string
- func UpdateScopes(scopes []kayenta.Scope, scope, startTimeIso, endTimeIso string, ...) []kayenta.Scope
- func WaitForComplete(ctx context.Context, executionID string, ...) error
- type ExecutionRequestContext
- type GraphicalProgressPrinter
- type ProgressFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildExecutionRequest ¶ added in v0.0.2
func BuildExecutionRequest(ctx ExecutionRequestContext) (*kayenta.ExecutionRequest, error)
func BuildScope ¶ added in v0.0.2
func TableStatus ¶
func TableStatus(o kayenta.GetStandaloneCanaryAnalysisOutput) string
func UpdateScopes ¶
func UpdateScopes(scopes []kayenta.Scope, scope, startTimeIso, endTimeIso string, controlOffset time.Duration) []kayenta.Scope
UpdateScopes is a helper function that will replace the values in an ExecRequest to produce the proper request
func WaitForComplete ¶
func WaitForComplete(ctx context.Context, executionID string, client kayenta.StandaloneCanaryAnalysisAPI, ticker *time.Ticker, progressFunc ProgressFunc) error
WaitForComplete this issues a call out to kayenta and then loops as it waits for it to finish. Likely we'll have to refactor the call signature to inject dependencies, for example, a ticker perhaps should live otuside of this function progressFunc is called on ever interval where the execution is not complete. if the execution is complete, progressFunc will not be called and the function will terminate.
Types ¶
type ExecutionRequestContext ¶ added in v0.0.2
type GraphicalProgressPrinter ¶
type GraphicalProgressPrinter struct {
// contains filtered or unexported fields
}
GraphicalProgressPrinter implements a kayenta.ProgressFunc that outputs the analysis of an analysis while we wait for the final result
func NewDefaultGraphicalProgressPrinter ¶
func NewDefaultGraphicalProgressPrinter() *GraphicalProgressPrinter
func (*GraphicalProgressPrinter) PrintProgress ¶
func (pp *GraphicalProgressPrinter) PrintProgress(res kayenta.GetStandaloneCanaryAnalysisOutput)
func (*GraphicalProgressPrinter) Start ¶
func (pp *GraphicalProgressPrinter) Start()
func (*GraphicalProgressPrinter) Stop ¶
func (pp *GraphicalProgressPrinter) Stop()
type ProgressFunc ¶
type ProgressFunc func(res kayenta.GetStandaloneCanaryAnalysisOutput)