client

package
v0.0.0-...-fb3d230 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// Token returns a token to be used for a test.
	Token() (string, error)
}

Authenticator is used to fetch a token to run the tests with.

type Consumer

type Consumer interface {
	// FirehoseWithoutReconnect establishes a firehose stream.
	FirehoseWithoutReconnect(string, string) (<-chan *events.Envelope, <-chan error)
}

Consumer is used to connect to a firehose.

type LogReliabilityTestRunner

type LogReliabilityTestRunner struct {
	// contains filtered or unexported fields
}

LogReliabilityTestRunner runs tests. Each test can be run in parallel to each other, and the test result will be submitted to the given Reporter. Tokens are required for the tests, which are fetched by the Authenticator.

func NewLogReliabilityTestRunner

func NewLogReliabilityTestRunner(
	loggregatorAddr string,
	subscriptionIDPrefix string,
	a Authenticator,
	r Reporter,
	c Consumer,
) *LogReliabilityTestRunner

NewLogReliabilityTestRunner builds a new LogReliabilityTestRunner.

func (*LogReliabilityTestRunner) Run

Run starts a new test. The test configuration is described by the Test type. Each firehose connection has a shardID built by the test ID.

type Reporter

type Reporter interface {
	// Report takes the TestResults and submits them.
	Report(t *reporter.TestResult) error
}

Reporter is used to report the test results.

type Runner

type Runner interface {
	Run(t *sharedapi.Test)
}

Runner runs the given tests.

type UAAClient

type UAAClient struct {
	// contains filtered or unexported fields
}

func NewUAAClient

func NewUAAClient(id, secret, uaaAddr string, c *http.Client) *UAAClient

func (*UAAClient) Token

func (a *UAAClient) Token() (string, error)

type WorkerClient

type WorkerClient struct {
	// contains filtered or unexported fields
}

WorkerClient reaches out to the control server to enroll. When tests are started, they will be sent via the websocket connection that the WorkerClient initiates. The given Runner will be invoked with any tests that the control server submits.

func NewWorkerClient

func NewWorkerClient(addr string, skipVerify bool, r Runner) *WorkerClient

NewWorkerClient builds a new WorkerClient.

func (*WorkerClient) Run

func (w *WorkerClient) Run(ctx context.Context) error

Run is used to start the WorkerClient. It starts the websocket connection with the control server. The given context controls the lifecycle of the Websocket. Each test will be ran (via the Runner) on a new go-routine.

Jump to

Keyboard shortcuts

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