Documentation ¶
Index ¶
- func FakeSecretsCreateSecret(name string, response *tcsecrets.Secret)
- func FakeSecretsReset()
- func FakeWorkerManagerRegistration() (*tcworkermanager.RegisterWorkerRequest, error)
- func FakeWorkerManagerReregistration() (*tcworkermanager.ReregisterWorkerRequest, error)
- func FakeWorkerManagerWorkerErrorReports() ([]*tcworkermanager.WorkerErrorReport, error)
- func FakeWorkerManagerWorkerRemovals() []*removedWorker
- func GetFakeWorkerManagerWorkerSecret() string
- func SetFakeWorkerManagerWorkerExpires(expires tcclient.Time)
- func SetFakeWorkerManagerWorkerSecret(secret string)
- type FakeSecrets
- type FakeWorkerManager
- func (wm *FakeWorkerManager) RegisterWorker(payload *tcworkermanager.RegisterWorkerRequest) (*tcworkermanager.RegisterWorkerResponse, error)
- func (wm *FakeWorkerManager) RemoveWorker(workerPoolID, workerGroup, workerID string) error
- func (wm *FakeWorkerManager) ReportWorkerError(workerPoolID string, payload *tcworkermanager.WorkerErrorReport) (*tcworkermanager.WorkerPoolError, error)
- func (wm *FakeWorkerManager) ReregisterWorker(payload *tcworkermanager.ReregisterWorkerRequest) (*tcworkermanager.ReregisterWorkerResponse, error)
- type Secrets
- type SecretsClientFactory
- type WorkerManager
- type WorkerManagerClientFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeSecretsCreateSecret ¶
Create a new secret with the given content; if this is nil then the secret is inaccessible (403 / InsufficientScopes)
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.
func FakeWorkerManagerReregistration ¶
func FakeWorkerManagerReregistration() (*tcworkermanager.ReregisterWorkerRequest, error)
Get the single reregistration that has occurred, or an error if there are not exactly one. This resets the list of registrations in the process.
func FakeWorkerManagerWorkerErrorReports ¶
func FakeWorkerManagerWorkerErrorReports() ([]*tcworkermanager.WorkerErrorReport, error)
func FakeWorkerManagerWorkerRemovals ¶
func FakeWorkerManagerWorkerRemovals() []*removedWorker
Get the worker removals that have occurred.
func GetFakeWorkerManagerWorkerSecret ¶
func GetFakeWorkerManagerWorkerSecret() string
func SetFakeWorkerManagerWorkerSecret ¶
func SetFakeWorkerManagerWorkerSecret(secret string)
Types ¶
type FakeSecrets ¶
type FakeSecrets struct {
// contains filtered or unexported fields
}
type FakeWorkerManager ¶
type FakeWorkerManager struct {
// contains filtered or unexported fields
}
func (*FakeWorkerManager) RegisterWorker ¶
func (wm *FakeWorkerManager) RegisterWorker(payload *tcworkermanager.RegisterWorkerRequest) (*tcworkermanager.RegisterWorkerResponse, error)
func (*FakeWorkerManager) RemoveWorker ¶
func (wm *FakeWorkerManager) RemoveWorker(workerPoolID, workerGroup, workerID string) error
func (*FakeWorkerManager) ReportWorkerError ¶
func (wm *FakeWorkerManager) ReportWorkerError(workerPoolID string, payload *tcworkermanager.WorkerErrorReport) (*tcworkermanager.WorkerPoolError, error)
func (*FakeWorkerManager) ReregisterWorker ¶
func (wm *FakeWorkerManager) ReregisterWorker(payload *tcworkermanager.ReregisterWorkerRequest) (*tcworkermanager.ReregisterWorkerResponse, error)
type Secrets ¶
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) ReportWorkerError(workerPoolID string, payload *tcworkermanager.WorkerErrorReport) (*tcworkermanager.WorkerPoolError, error) ReregisterWorker(payload *tcworkermanager.ReregisterWorkerRequest) (*tcworkermanager.ReregisterWorkerResponse, 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.