Documentation ¶
Index ¶
- func FilterLogs(opts ...LogFilterOption) func(observer.LoggedEntry) bool
- type BrokerTestRunner
- func (r *BrokerTestRunner) AddBroker(name string, port int, backend backend.Interface)
- func (r *BrokerTestRunner) AddConsumer(name string, consumer lib.Consumer)
- func (r *BrokerTestRunner) AddProducer(name string, producer lib.Producer)
- func (r *BrokerTestRunner) CleanUp()
- func (r *BrokerTestRunner) GetBroker(name string) *ManagedBroker
- func (r *BrokerTestRunner) GetBrokerEndPoint(name string) string
- func (r *BrokerTestRunner) GetBrokerGlobals(name string) *pkgcmd.Globals
- func (r *BrokerTestRunner) GetBrokerStatus(name string) RunnerComponentStatus
- func (r *BrokerTestRunner) GetLogger() *zap.Logger
- func (r *BrokerTestRunner) GetObservedLogs() *observer.ObservedLogs
- func (r *BrokerTestRunner) StartBroker(name string)
- func (r *BrokerTestRunner) StartConsumer(name string)
- func (r *BrokerTestRunner) StopBroker(name string)
- func (r *BrokerTestRunner) StopConsumer(name string)
- func (r *BrokerTestRunner) UpdateBrokerConfig(name string, cfg *cfgbroker.Config)
- func (r *BrokerTestRunner) WaitForLogEntry(timeout time.Duration, opts ...LogFilterOption) bool
- type Event
- type LogFilterOption
- type ManagedBroker
- type ManagedConsumer
- type RunnerComponentStatus
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLogs ¶
func FilterLogs(opts ...LogFilterOption) func(observer.LoggedEntry) bool
Types ¶
type BrokerTestRunner ¶
type BrokerTestRunner struct {
// contains filtered or unexported fields
}
func NewBrokerTestRunner ¶
func NewBrokerTestRunner(ctx context.Context, t *testing.T) *BrokerTestRunner
func (*BrokerTestRunner) AddBroker ¶
func (r *BrokerTestRunner) AddBroker(name string, port int, backend backend.Interface)
func (*BrokerTestRunner) AddConsumer ¶
func (r *BrokerTestRunner) AddConsumer(name string, consumer lib.Consumer)
func (*BrokerTestRunner) AddProducer ¶
func (r *BrokerTestRunner) AddProducer(name string, producer lib.Producer)
func (*BrokerTestRunner) CleanUp ¶
func (r *BrokerTestRunner) CleanUp()
func (*BrokerTestRunner) GetBroker ¶
func (r *BrokerTestRunner) GetBroker(name string) *ManagedBroker
func (*BrokerTestRunner) GetBrokerEndPoint ¶
func (r *BrokerTestRunner) GetBrokerEndPoint(name string) string
func (*BrokerTestRunner) GetBrokerGlobals ¶
func (r *BrokerTestRunner) GetBrokerGlobals(name string) *pkgcmd.Globals
func (*BrokerTestRunner) GetBrokerStatus ¶
func (r *BrokerTestRunner) GetBrokerStatus(name string) RunnerComponentStatus
func (*BrokerTestRunner) GetLogger ¶
func (r *BrokerTestRunner) GetLogger() *zap.Logger
func (*BrokerTestRunner) GetObservedLogs ¶
func (r *BrokerTestRunner) GetObservedLogs() *observer.ObservedLogs
func (*BrokerTestRunner) StartBroker ¶
func (r *BrokerTestRunner) StartBroker(name string)
func (*BrokerTestRunner) StartConsumer ¶
func (r *BrokerTestRunner) StartConsumer(name string)
func (*BrokerTestRunner) StopBroker ¶
func (r *BrokerTestRunner) StopBroker(name string)
func (*BrokerTestRunner) StopConsumer ¶
func (r *BrokerTestRunner) StopConsumer(name string)
func (*BrokerTestRunner) UpdateBrokerConfig ¶
func (r *BrokerTestRunner) UpdateBrokerConfig(name string, cfg *cfgbroker.Config)
func (*BrokerTestRunner) WaitForLogEntry ¶
func (r *BrokerTestRunner) WaitForLogEntry(timeout time.Duration, opts ...LogFilterOption) bool
type LogFilterOption ¶
type LogFilterOption func(le observer.LoggedEntry) bool
func LogFilterWithField ¶
func LogFilterWithField(field zapcore.Field) LogFilterOption
func LogFilterWithLevel ¶
func LogFilterWithLevel(level zapcore.Level) LogFilterOption
func LogFilterWithMessage ¶
func LogFilterWithMessage(msg string) LogFilterOption
type ManagedBroker ¶
type ManagedBroker struct { Instance *broker.Instance Globals *pkgcmd.Globals Cancel context.CancelFunc Status RunnerComponentStatus }
type ManagedConsumer ¶
type ManagedConsumer struct { Consumer lib.Consumer Cancel context.CancelFunc Status RunnerComponentStatus }
type RunnerComponentStatus ¶
type RunnerComponentStatus string
const ( RunnerComponentStatusStopped RunnerComponentStatus = "stopped" RunnerComponentStatusStarted RunnerComponentStatus = "started" RunnerComponentStatusStopping RunnerComponentStatus = "stopping" )
Click to show internal directories.
Click to hide internal directories.