Documentation ¶
Index ¶
- func AsyncClients(n int, tmpl *MockClient) []mode.AsyncProtocolClient
- func AsyncPublishCollect(collected *[][]outputs.Data) func(func([]outputs.Data, error), []outputs.Data) error
- func AsyncPublishCollectAfterFailStart(n int, collected *[][]outputs.Data) func(func([]outputs.Data, error), []outputs.Data) error
- func AsyncPublishCollectAfterFailStartWith(n int, err error, collected *[][]outputs.Data) func(func([]outputs.Data, error), []outputs.Data) error
- func AsyncPublishFailStart(n int, pub func(func([]outputs.Data, error), []outputs.Data) error) func(func([]outputs.Data, error), []outputs.Data) error
- func AsyncPublishFailStartWith(n int, err error, pub func(func([]outputs.Data, error), []outputs.Data) error) func(func([]outputs.Data, error), []outputs.Data) error
- func AsyncPublishIgnore(func([]outputs.Data, error), []outputs.Data) 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 EventsList(in []EventInfo) [][]outputs.Data
- func FlatEventsList(in []EventInfo) []outputs.Data
- func FlattenEvents(data [][]outputs.Data) []outputs.Data
- func PublishAllWith(t *testing.T, mode mode.ConnectionMode, data []EventInfo) ([]bool, [][]outputs.Data)
- func PublishCollect(collected *[][]outputs.Data) func(data []outputs.Data) ([]outputs.Data, error)
- func PublishCollectAfterFailStart(n int, collected *[][]outputs.Data) func(data []outputs.Data) ([]outputs.Data, error)
- func PublishCollectAfterFailStartWith(n int, err error, collected *[][]outputs.Data) func(data []outputs.Data) ([]outputs.Data, error)
- func PublishFailStart(n int, pub func(data []outputs.Data) ([]outputs.Data, error)) func(data []outputs.Data) ([]outputs.Data, error)
- func PublishFailWith(n int, err error, pub func([]outputs.Data) ([]outputs.Data, error)) func([]outputs.Data) ([]outputs.Data, error)
- func PublishIgnore([]outputs.Data) ([]outputs.Data, error)
- func PublishWith(t *testing.T, mode mode.ConnectionMode, opts outputs.Options, data []EventInfo, ...) ([]bool, [][]outputs.Data)
- func Signals(s ...bool) []bool
- func SyncClients(n int, tmpl *MockClient) []mode.ProtocolClient
- func TestMode(t *testing.T, mode mode.ConnectionMode, opts outputs.Options, data []EventInfo, ...)
- type EventInfo
- type MockClient
- func (c *MockClient) AsyncPublishEvent(cb func(error), data outputs.Data) error
- func (c *MockClient) AsyncPublishEvents(cb func([]outputs.Data, error), data []outputs.Data) error
- func (c *MockClient) Close() error
- func (c *MockClient) Connect(timeout time.Duration) error
- func (c *MockClient) PublishEvent(data outputs.Data) error
- func (c *MockClient) PublishEvents(data []outputs.Data) ([]outputs.Data, 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 EventsList ¶
func FlatEventsList ¶
func PublishAllWith ¶
func PublishCollect ¶
func PublishFailStart ¶
func PublishFailWith ¶
func PublishWith ¶
func SyncClients ¶
func SyncClients(n int, tmpl *MockClient) []mode.ProtocolClient
Types ¶
type EventInfo ¶
func SingleEvent ¶
type MockClient ¶
type MockClient struct { Connected bool CBPublish func([]outputs.Data) ([]outputs.Data, error) CBAsyncPublish func(func([]outputs.Data, error), []outputs.Data) 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), data outputs.Data) error
func (*MockClient) AsyncPublishEvents ¶
func (*MockClient) Close ¶
func (c *MockClient) Close() error
func (*MockClient) PublishEvent ¶
func (c *MockClient) PublishEvent(data outputs.Data) error
func (*MockClient) PublishEvents ¶
Click to show internal directories.
Click to hide internal directories.