Versions in this module Expand all Collapse all v0 v0.31.1 Mar 16, 2021 v0.31.0 Mar 11, 2021 Changes in this version + const MaxRetries + const RequestTimeout + const RetryInterval + var ErrNotAuthenticated = errors.New("Failed to authenticate with Load Impact cloud") + var ErrNotAuthorized = errors.New("Not allowed to upload result to Load Impact cloud") + var ErrUnknown = errors.New("An error occurred talking to Load Impact cloud") + func MergeFromExternal(external map[string]json.RawMessage, conf *Config) error + func URLForResults(refID string, config Config) string + type Client struct + func NewClient(logger logrus.FieldLogger, token, host, version string) *Client + func (c *Client) CreateTestRun(testRun *TestRun) (*CreateTestRunResponse, error) + func (c *Client) Do(req *http.Request, v interface{}) error + func (c *Client) GetTestProgress(referenceID string) (*TestProgressResponse, error) + func (c *Client) Login(email string, password string) (*LoginResponse, error) + func (c *Client) NewRequest(method, url string, data interface{}) (*http.Request, error) + func (c *Client) StartCloudTestRun(name string, projectID int64, arc *lib.Archive) (string, error) + func (c *Client) StopCloudTestRun(referenceID string) error + func (c *Client) TestFinished(referenceID string, thresholds ThresholdResult, tained bool, ...) error + func (c *Client) ValidateOptions(options lib.Options) error + type Config struct + AggregationCalcInterval types.NullDuration + AggregationMinSamples null.Int + AggregationOutlierAlgoThreshold null.Int + AggregationOutlierIqrCoefLower null.Float + AggregationOutlierIqrCoefUpper null.Float + AggregationOutlierIqrRadius null.Float + AggregationPeriod types.NullDuration + AggregationSkipOutlierDetection null.Bool + AggregationWaitPeriod types.NullDuration + DeprecatedToken null.String + Host null.String + LogsTailURL null.String + MaxMetricSamplesPerPackage null.Int + MetricPushConcurrency null.Int + MetricPushInterval types.NullDuration + Name null.String + NoCompress null.Bool + ProjectID null.Int + PushRefID null.String + Token null.String + WebAppURL null.String + func GetConsolidatedConfig(jsonRawConf json.RawMessage, env map[string]string, configArg string) (Config, error) + func NewConfig() Config + func (c *Config) StreamLogsToLogger(ctx context.Context, logger logrus.FieldLogger, referenceID string, ...) error + func (c Config) Apply(cfg Config) Config + type CreateTestRunResponse struct + ConfigOverride *Config + ReferenceID string + type ErrorResponse struct + Code int + Details map[string][]string + Errors []string + FieldErrors map[string][]string + Message string + Response *http.Response + func (e ErrorResponse) Error() string + type LoginResponse struct + Token string + type ResultStatus int + const ResultStatusFailed + const ResultStatusPassed + type TestProgressResponse struct + Progress float64 + ResultStatus ResultStatus + RunStatus lib.RunStatus + RunStatusText string + type TestRun struct + Duration int64 + Name string + ProjectID int64 + Thresholds map[string][]string + VUsMax int64 + type ThresholdResult map[string]map[string]bool