mocks

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockInfluxClient

type MockInfluxClient struct {
	mock.Mock
}

MockInfluxClient represents a mock InfluxDB client.

func (*MockInfluxClient) Close

func (m *MockInfluxClient) Close() error

Close releases any resources a Client may be using.

func (*MockInfluxClient) Ping

func (m *MockInfluxClient) Ping(timeout time.Duration) (time.Duration, string, error)

Ping checks that status of cluster, and will always return 0 time and no error for UDP clients.

func (*MockInfluxClient) Query

func (m *MockInfluxClient) Query(q client.Query) (*client.Response, error)

Query makes an InfluxDB Query on the database. This will fail if using the UDP client.

func (*MockInfluxClient) Write

func (m *MockInfluxClient) Write(bp client.BatchPoints) error

Write takes a BatchPoints object and writes all Points to InfluxDB.

type MockKafka added in v0.2.1

type MockKafka struct {
	mock.Mock
}

MockKafka represents a mock Kafka client.

func (MockKafka) Brokers added in v0.3.3

func (m MockKafka) Brokers() []kage.KafkaBroker

Brokers returns a list of Kafka brokers.

func (MockKafka) Close added in v0.2.1

func (m MockKafka) Close()

Close gracefully stops the Kafka client.

func (MockKafka) IsHealthy added in v0.2.1

func (m MockKafka) IsHealthy() bool

IsHealthy checks the health of the Kafka client.

type MockKafkaBroker added in v0.3.3

type MockKafkaBroker struct {
	mock.Mock
}

MockKafkaBroker represents a mock Kafka broker.

func (MockKafkaBroker) Connected added in v0.3.3

func (m MockKafkaBroker) Connected() bool

Connected returns the Broker connection status.

func (MockKafkaBroker) ID added in v0.3.3

func (m MockKafkaBroker) ID() int32

ID returns the Broker id.

type MockReporter

type MockReporter struct {
	mock.Mock
}

MockReporter represents a mock Reporter.

func (*MockReporter) ReportBrokerOffsets

func (m *MockReporter) ReportBrokerOffsets(o *kage.BrokerOffsets)

ReportBrokerOffsets reports a snapshot of the broker offsets.

func (*MockReporter) ReportConsumerOffsets

func (m *MockReporter) ReportConsumerOffsets(o *kage.ConsumerOffsets)

ReportConsumerOffsets reports a snapshot of the consumer group offsets.

type MockStore added in v0.2.1

type MockStore struct {
	mock.Mock
}

MockStore represents a mock offset store.

func (*MockStore) AddOffset added in v0.2.1

func (m *MockStore) AddOffset(o *kage.PartitionOffset)

AddOffset adds an offset into the store.

func (*MockStore) BrokerOffsets added in v0.2.1

func (m *MockStore) BrokerOffsets() kage.BrokerOffsets

BrokerOffsets returns a snapshot of the current broker offsets.

func (*MockStore) Channel added in v0.2.1

func (m *MockStore) Channel() chan *kage.PartitionOffset

Channel get the offset channel.

func (*MockStore) Close added in v0.2.1

func (m *MockStore) Close()

Close gracefully stops the Store.

func (*MockStore) ConsumerOffsets added in v0.2.1

func (m *MockStore) ConsumerOffsets() kage.ConsumerOffsets

ConsumerOffsets returns a snapshot of the current consumer group offsets.

Jump to

Keyboard shortcuts

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