test

package
v0.9.0-rc19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessagingClient

type MessagingClient struct {
	PublishFunc func(*messaging.Message) (uint64, error)
	ConnFunc    func(topicID uint64) influxdb.MessagingConn
	// contains filtered or unexported fields
}

MessagingClient represents a test client for the messaging broker.

func NewMessagingClient

func NewMessagingClient() *MessagingClient

NewMessagingClient returns a new instance of MessagingClient.

func (*MessagingClient) Close

func (c *MessagingClient) Close() error

Close closes all open connections.

func (*MessagingClient) Conn

func (c *MessagingClient) Conn(topicID uint64) influxdb.MessagingConn

func (*MessagingClient) DefaultConnFunc

func (c *MessagingClient) DefaultConnFunc(topicID uint64) influxdb.MessagingConn

DefaultConnFunc returns a connection for a specific topic.

func (*MessagingClient) DefaultPublishFunc

func (c *MessagingClient) DefaultPublishFunc(m *messaging.Message) (uint64, error)

DefaultPublishFunc sets an autoincrementing index on the message and sends it to each topic connection.

func (*MessagingClient) Open

func (c *MessagingClient) Open(path string) error

func (*MessagingClient) Publish

func (c *MessagingClient) Publish(m *messaging.Message) (uint64, error)

func (*MessagingClient) SetURLs

func (c *MessagingClient) SetURLs([]url.URL)

func (*MessagingClient) Sync

func (c *MessagingClient) Sync(index uint64)

Sync blocks until a given index has been sent through the client.

func (*MessagingClient) URLs

func (c *MessagingClient) URLs() []url.URL

type MessagingConn

type MessagingConn struct {
	// contains filtered or unexported fields
}

MessagingConn represents a mockable connection implementing influxdb.MessagingConn.

func NewMessagingConn

func NewMessagingConn(topicID uint64) *MessagingConn

NewMessagingConn returns a new instance of MessagingConn.

func (*MessagingConn) C

func (c *MessagingConn) C() <-chan *messaging.Message

C returns a channel for streaming message.

func (*MessagingConn) Close

func (c *MessagingConn) Close() error

Close closes the streaming channel.

func (*MessagingConn) Open

func (c *MessagingConn) Open(index uint64, streaming bool) error

Open starts the stream from a given index.

func (*MessagingConn) Send

func (c *MessagingConn) Send(m *messaging.Message)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL