mocks

package
v1.1.1-0...-2036212 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 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

type MockMonitor struct {
	mock.Mock
}

MockMonitor represents a mock Kafka client.

func (*MockMonitor) Brokers

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

Brokers returns a list of Kafka brokers.

func (*MockMonitor) Close

func (m *MockMonitor) Close()

Close gracefully stops the Kafka client.

func (*MockMonitor) Collect

func (m *MockMonitor) Collect()

Collect collects the state of Monitor.

func (*MockMonitor) IsHealthy

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

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

type MockStore struct {
	mock.Mock
}

MockStore represents a mock offset store.

func (*MockStore) BrokerMetadata

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

BrokerMetadata returns a snapshot of the current broker metadata.

func (*MockStore) BrokerOffsets

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

BrokerOffsets returns a snapshot of the current broker offsets.

func (*MockStore) Channel

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

Channel get the offset channel.

func (*MockStore) Close

func (m *MockStore) Close()

Close gracefully stops the Store.

func (*MockStore) ConsumerOffsets

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

ConsumerOffsets returns a snapshot of the current consumer group offsets.

func (*MockStore) SetState

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