Documentation ¶
Index ¶
- func AsyncClients(n int, tmpl *MockClient) []mode.AsyncProtocolClient
- func AsyncPublishCollect(collected *[][]common.MapStr) func(func([]common.MapStr, error), []common.MapStr) error
- func AsyncPublishCollectAfterFailStart(n int, collected *[][]common.MapStr) func(func([]common.MapStr, error), []common.MapStr) error
- func AsyncPublishCollectAfterFailStartWith(n int, err error, collected *[][]common.MapStr) func(func([]common.MapStr, error), []common.MapStr) error
- func AsyncPublishFailStart(n int, pub func(func([]common.MapStr, error), []common.MapStr) error) func(func([]common.MapStr, error), []common.MapStr) error
- func AsyncPublishFailStartWith(n int, err error, ...) func(func([]common.MapStr, error), []common.MapStr) error
- func AsyncPublishIgnore(func([]common.MapStr, error), []common.MapStr) error
- func CloseOK() error
- func ConnectFail(err error) func(time.Duration) error
- func ConnectFailN(n int, err error) func(time.Duration) error
- func ConnectOK(timeout time.Duration) error
- func PublishCollect(collected *[][]common.MapStr) func(events []common.MapStr) ([]common.MapStr, error)
- func PublishCollectAfterFailStart(n int, collected *[][]common.MapStr) func(events []common.MapStr) ([]common.MapStr, error)
- func PublishCollectAfterFailStartWith(n int, err error, collected *[][]common.MapStr) func(events []common.MapStr) ([]common.MapStr, error)
- func PublishFailStart(n int, pub func(events []common.MapStr) ([]common.MapStr, error)) func(events []common.MapStr) ([]common.MapStr, error)
- func PublishFailWith(n int, err error, pub func([]common.MapStr) ([]common.MapStr, error)) func([]common.MapStr) ([]common.MapStr, error)
- func PublishIgnore([]common.MapStr) ([]common.MapStr, error)
- func Signals(s ...bool) []bool
- func SyncClients(n int, tmpl *MockClient) []mode.ProtocolClient
- func TestMode(t *testing.T, mode mode.ConnectionMode, opts outputs.Options, ...)
- type EventInfo
- type MockClient
- func (c *MockClient) AsyncPublishEvent(cb func(error), event common.MapStr) error
- func (c *MockClient) AsyncPublishEvents(cb func([]common.MapStr, error), events []common.MapStr) error
- func (c *MockClient) Close() error
- func (c *MockClient) Connect(timeout time.Duration) error
- func (c *MockClient) IsConnected() bool
- func (c *MockClient) PublishEvent(event common.MapStr) error
- func (c *MockClient) PublishEvents(events []common.MapStr) ([]common.MapStr, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncClients ¶
func AsyncClients(n int, tmpl *MockClient) []mode.AsyncProtocolClient
func AsyncPublishCollect ¶
func AsyncPublishFailStart ¶
func AsyncPublishIgnore ¶
func PublishCollect ¶
func PublishFailStart ¶
func PublishFailWith ¶
func SyncClients ¶
func SyncClients(n int, tmpl *MockClient) []mode.ProtocolClient
Types ¶
type EventInfo ¶
func SingleEvent ¶
type MockClient ¶
type MockClient struct { Connected bool CBPublish func([]common.MapStr) ([]common.MapStr, error) CBAsyncPublish func(func([]common.MapStr, error), []common.MapStr) error CBClose func() error CBConnect func(time.Duration) error }
func NewMockClient ¶
func NewMockClient(template *MockClient) *MockClient
func (*MockClient) AsyncPublishEvent ¶
func (c *MockClient) AsyncPublishEvent(cb func(error), event common.MapStr) error
func (*MockClient) AsyncPublishEvents ¶
func (*MockClient) Close ¶
func (c *MockClient) Close() error
func (*MockClient) IsConnected ¶
func (c *MockClient) IsConnected() bool
func (*MockClient) PublishEvent ¶
func (c *MockClient) PublishEvent(event common.MapStr) error
func (*MockClient) PublishEvents ¶
Click to show internal directories.
Click to hide internal directories.