cluster

package
v0.0.0-...-07ad8dd Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: BSD-2-Clause Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLeaderNotFound = errors.New("leader not found")
	ErrCoordNotFound  = errors.New("coordinator not found")
	ErrNoBrokerFound  = errors.New("no broker found")
)

Functions

func New

func New(newBroker NewBrokerFunc, brokers []string) model.Cluster

Types

type C

type C struct {
	// contains filtered or unexported fields
}

func (*C) Coordinator

func (c *C) Coordinator(group string) (model.Broker, error)

func (*C) CoordinatorIsDown

func (c *C) CoordinatorIsDown(group string)

func (*C) Leader

func (c *C) Leader(topic string, partition int32) (model.Broker, error)

func (*C) LeaderIsDown

func (c *C) LeaderIsDown(topic string, partition int32)

func (*C) Partitions

func (c *C) Partitions(topic string) ([]int32, error)

type MultiError

type MultiError []error

func (*MultiError) Add

func (es *MultiError) Add(err error)

func (MultiError) Error

func (es MultiError) Error() string

type NewBrokerFunc

type NewBrokerFunc func(addr string) model.Broker

Jump to

Keyboard shortcuts

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