mocks

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 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 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 MockMonitor added in v1.0.0

type MockMonitor struct {
	mock.Mock
}

MockMonitor represents a mock Kafka client.

func (MockMonitor) Brokers added in v1.0.0

func (m MockMonitor) Brokers() []kafka.Broker

Brokers returns a list of Kafka brokers.

func (MockMonitor) Close added in v1.0.0

func (m MockMonitor) Close()

Close gracefully stops the Kafka client.

func (MockMonitor) Collect added in v1.0.0

func (m MockMonitor) Collect()

Collect collects the state of Monitor.

func (MockMonitor) IsHealthy added in v1.0.0

func (m MockMonitor) IsHealthy() bool

IsHealthy checks the health of the Kafka client.

type MockReporter

type MockReporter struct {
	mock.Mock
}

MockReporter represents a mock Reporter.

func (*MockReporter) ReportBrokerMetadata added in v1.0.0

func (m *MockReporter) ReportBrokerMetadata(v *store.BrokerMetadata)

ReportBrokerMetadata reports a snapshot of the broker metadata.

func (*MockReporter) ReportBrokerOffsets

func (m *MockReporter) ReportBrokerOffsets(v *store.BrokerOffsets)

ReportBrokerOffsets reports a snapshot of the broker offsets.

func (*MockReporter) ReportConsumerOffsets

func (m *MockReporter) ReportConsumerOffsets(v *store.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) BrokerMetadata added in v1.0.0

func (m *MockStore) BrokerMetadata() store.BrokerMetadata

BrokerMetadata returns a snapshot of the current broker metadata.

func (*MockStore) BrokerOffsets added in v0.2.1

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

BrokerOffsets returns a snapshot of the current broker offsets.

func (*MockStore) Channel added in v0.2.1

func (m *MockStore) Channel() chan interface{}

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() store.ConsumerOffsets

ConsumerOffsets returns a snapshot of the current consumer group offsets.

func (*MockStore) SetState added in v1.0.0

func (m *MockStore) SetState(v interface{}) error

SetState adds a state into the store.

Jump to

Keyboard shortcuts

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