Documentation ¶
Index ¶
- type TestAgentSink
- func (tas *TestAgentSink) Errors() error
- func (tas *TestAgentSink) Events() []sdkEvent.Event
- func (tas *TestAgentSink) ForgetEvents()
- func (tas *TestAgentSink) HandleEvent(kubeEvent common.KubeEvent) error
- func (tas *TestAgentSink) Has(testEvent *sdkEvent.Event) bool
- func (tas *TestAgentSink) ServeHTTP(rw http.ResponseWriter, r *http.Request)
- func (tas *TestAgentSink) Wait(betweenEvents, max time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestAgentSink ¶
type TestAgentSink struct {
// contains filtered or unexported fields
}
TestAgentSink is an instrumented infra-agent sink for testing e2e reception and processing.
func NewTestAgentSink ¶
func NewTestAgentSink() *TestAgentSink
NewTestAgentSink returns an instrumented infra-agent sink for testing.
func (*TestAgentSink) Errors ¶
func (tas *TestAgentSink) Errors() error
func (*TestAgentSink) Events ¶
func (tas *TestAgentSink) Events() []sdkEvent.Event
Events returns the list of events the mock has captured.
func (*TestAgentSink) ForgetEvents ¶
func (tas *TestAgentSink) ForgetEvents()
ForgetEvents erases all the recorded events.
func (*TestAgentSink) HandleEvent ¶
func (tas *TestAgentSink) HandleEvent(kubeEvent common.KubeEvent) error
HandleEvent sends a notification to the event received channel and then forwards it to the underlying sink.
func (*TestAgentSink) Has ¶
func (tas *TestAgentSink) Has(testEvent *sdkEvent.Event) bool
Has relaxedly checks whether the mocked agent has received an event.
func (*TestAgentSink) ServeHTTP ¶
func (tas *TestAgentSink) ServeHTTP(rw http.ResponseWriter, r *http.Request)
ServeHTTP handles a request that would be for the infra-agent and stores the unmarshalled event.
Click to show internal directories.
Click to hide internal directories.