insights

package
v0.117.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LaunchOptions = map[config.LaunchOrder]string{
	config.LaunchOrderFailRate: "fail_rate",
}

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient  *http.Client
	URL         string
	Credentials credentials.Credentials
}

Client service

func New

func New(url string, creds credentials.Credentials, timeout time.Duration) Client

func (*Client) GetHistory

func (c *Client) GetHistory(ctx context.Context, user iam.User, launchOrder config.LaunchOrder) (JobHistory, error)

GetHistory returns job history from insights

type JobHistory

type JobHistory struct {
	TestCases []TestCase `json:"test_cases"`
}

JobHistory represents job history data structure

type Service

type Service interface {
	GetHistory(context.Context, iam.User, config.LaunchOrder) (JobHistory, error)
}

type TestCase

type TestCase struct {
	Name     string  `json:"name"`
	FailRate float64 `json:"fail_rate"`
}

TestCase represents test case data structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL