Documentation
¶
Index ¶
- Constants
- Variables
- func InitLogging(c *C)
- func NewTestConfig(clientID string) *config.T
- func NewUDSHTTPClient(unixSockAddr string) *http.Client
- type KafkaHelper
- func (kh *KafkaHelper) Close()
- func (kh *KafkaHelper) GetMessages(topic string, begin, end []int64) [][]string
- func (kh *KafkaHelper) GetOffsets(topic string) []int64
- func (kh *KafkaHelper) PutMessages(prefix, topic string, keys map[string]int) map[string][]*sarama.ProducerMessage
- func (kh *KafkaHelper) ResetOffsets(group, topic string)
Constants ¶
View Source
const ( // Use Shopify/sarama Vagrant box (copied over from https://github.com/Shopify/sarama/blob/master/functional_test.go#L18) VagrantKafkaPeers = "192.168.100.67:9091,192.168.100.67:9092,192.168.100.67:9093,192.168.100.67:9094,192.168.100.67:9095" VagrantZookeeperPeers = "192.168.100.67:2181,192.168.100.67:2182,192.168.100.67:2183,192.168.100.67:2184,192.168.100.67:2185" )
Variables ¶
View Source
var ( KafkaPeers []string ZookeeperPeers []string )
Functions ¶
func InitLogging ¶
func InitLogging(c *C)
InitLogging initializes both internal and 3rd party loggers to output logs using the test context object's `Log` function.
func NewTestConfig ¶
func NewUDSHTTPClient ¶
NewUDSHTTPClient creates an HTTP client that always connects to the specified unix domain socket ignoring the host part of requested HTTP URLs.
Types ¶
type KafkaHelper ¶
type KafkaHelper struct {
// contains filtered or unexported fields
}
func NewKafkaHelper ¶
func NewKafkaHelper(c *C) *KafkaHelper
func (*KafkaHelper) Close ¶
func (kh *KafkaHelper) Close()
func (*KafkaHelper) GetMessages ¶
func (kh *KafkaHelper) GetMessages(topic string, begin, end []int64) [][]string
func (*KafkaHelper) GetOffsets ¶
func (kh *KafkaHelper) GetOffsets(topic string) []int64
func (*KafkaHelper) PutMessages ¶
func (kh *KafkaHelper) PutMessages(prefix, topic string, keys map[string]int) map[string][]*sarama.ProducerMessage
func (*KafkaHelper) ResetOffsets ¶
func (kh *KafkaHelper) ResetOffsets(group, topic string)
Click to show internal directories.
Click to hide internal directories.