testhelpers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 NewTestConfig(clientID string) *config.T

func NewUDSHTTPClient

func NewUDSHTTPClient(unixSockAddr string) *http.Client

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)

Jump to

Keyboard shortcuts

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