Documentation ¶
Index ¶
- type Config
- type HandlerProperties
- type LastStatusInformation
- type TestWorker
- func (tw *TestWorker) AddClusterWorkerMember(t *testing.T, opts *TestWorkerOpts) *TestWorker
- func (tw *TestWorker) Cancel()
- func (tw *TestWorker) Config() *Config
- func (tw *TestWorker) Context() context.Context
- func (tw *TestWorker) ControllerAddrs() []string
- func (tw *TestWorker) Name() string
- func (tw *TestWorker) ProxyAddrs() []string
- func (tw *TestWorker) Shutdown()
- func (tw *TestWorker) Worker() *Worker
- type TestWorkerOpts
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerProperties ¶
type HandlerProperties struct {
ListenerConfig *configutil.Listener
}
type LastStatusInformation ¶
type LastStatusInformation struct { *pbs.StatusResponse StatusTime time.Time }
type TestWorker ¶
type TestWorker struct {
// contains filtered or unexported fields
}
TestWorker wraps a base.Server and Worker to provide a fully-programmatic worker for tests. Error checking (for instance, for valid config) is not stringent at the moment.
func NewTestWorker ¶
func NewTestWorker(t *testing.T, opts *TestWorkerOpts) *TestWorker
func (*TestWorker) AddClusterWorkerMember ¶
func (tw *TestWorker) AddClusterWorkerMember(t *testing.T, opts *TestWorkerOpts) *TestWorker
func (*TestWorker) Cancel ¶
func (tw *TestWorker) Cancel()
func (*TestWorker) Config ¶
func (tw *TestWorker) Config() *Config
func (*TestWorker) Context ¶
func (tw *TestWorker) Context() context.Context
func (*TestWorker) ControllerAddrs ¶
func (tw *TestWorker) ControllerAddrs() []string
func (*TestWorker) Name ¶
func (tw *TestWorker) Name() string
func (*TestWorker) ProxyAddrs ¶
func (tw *TestWorker) ProxyAddrs() []string
func (*TestWorker) Shutdown ¶
func (tw *TestWorker) Shutdown()
Shutdown runs any cleanup functions; be sure to run this after your test is done
func (*TestWorker) Worker ¶
func (tw *TestWorker) Worker() *Worker
Worker returns the underlying controller
type TestWorkerOpts ¶
type TestWorkerOpts struct { // Config; if not provided a dev one will be created Config *config.Config // Sets initial controller addresses InitialControllers []string // If true, the worker will not be started DisableAutoStart bool // The worker auth KMS to use, or one will be created WorkerAuthKms wrapping.Wrapper // The name to use for the worker, otherwise one will be randomly // generated, unless provided in a non-nil Config Name string // The logger to use, or one will be created Logger hclog.Logger }
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) LastStatusSuccess ¶
func (w *Worker) LastStatusSuccess() *LastStatusInformation
LastStatusSuccess is used in tests (it's exported for tests in other packages) to verify the last time we sent status
Click to show internal directories.
Click to hide internal directories.