tc

package
v29.6.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeSecretsCreateSecret

func FakeSecretsCreateSecret(name string, response *tcsecrets.Secret)

Create a new secret with the given content; if this is nil then the secret is inaccessible (403 / InsufficientScopes)

func FakeSecretsReset

func FakeSecretsReset()

Reset fake secrets

func FakeWorkerManagerRegistration

func FakeWorkerManagerRegistration() (*tcworkermanager.RegisterWorkerRequest, error)

Get the single registration that has occurred, or an error if there are not exactly one. This resets the list of registrations in the process.

Types

type FakeSecrets

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

func (*FakeSecrets) Get

func (cli *FakeSecrets) Get(name string) (*tcsecrets.Secret, error)

type FakeWorkerManager

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

func (*FakeWorkerManager) RegisterWorker

func (*FakeWorkerManager) RemoveWorker

func (wm *FakeWorkerManager) RemoveWorker(workerPoolID, workerGroup, workerID string) error

type Secrets

type Secrets interface {
	Get(name string) (*tcsecrets.Secret, error)
}

An interface containing the functions required of Secrets, allowing use of fakes that also match this interface.

func FakeSecretsClientFactory

func FakeSecretsClientFactory(rootURL string, credentials *tcclient.Credentials) (Secrets, error)

A function matching SecretsClientFactory that can be used in testing

type SecretsClientFactory

type SecretsClientFactory func(rootURL string, credentials *tcclient.Credentials) (Secrets, error)

A factory type that can create new instances of the Secrets interface.

type WorkerManager

type WorkerManager interface {
	RegisterWorker(payload *tcworkermanager.RegisterWorkerRequest) (*tcworkermanager.RegisterWorkerResponse, error)
	RemoveWorker(workerPoolID, workerGroup, workerID string) error
}

An interface containing the functions required of WorkerManager, allowing use of fakes that also match this interface.

func FakeWorkerManagerClientFactory

func FakeWorkerManagerClientFactory(rootURL string, credentials *tcclient.Credentials) (WorkerManager, error)

A function matching WorkerManagerClientFactory that can be used in testing

type WorkerManagerClientFactory

type WorkerManagerClientFactory func(rootURL string, credentials *tcclient.Credentials) (WorkerManager, error)

A factory type that can create new instances of the WorkerManager interface.

Jump to

Keyboard shortcuts

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