Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Balancer ¶
type Balancer struct {
// contains filtered or unexported fields
}
Balancer provides IPs resolved from a DNS address in random order
func NewBalancer ¶
func NewBalancer(addr string, opts ...BalancerOption) *Balancer
NewBalancer returns a Balancer
func (*Balancer) NextHostPort ¶
NextHostPort returns hostport resolved from the balancer's addr. It returns error for an invalid addr or if lookup failed or doesn't resolve to anything.
type BalancerOption ¶
type BalancerOption func(*Balancer)
BalancerOption is a type that will manipulate a config
type ClientFetcher ¶
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func New ¶
func New(conns ...Conn) *ClientPool
func (*ClientPool) Write ¶
func (c *ClientPool) Write(msg []byte) error
type ConnManager ¶
type ConnManager struct {
// contains filtered or unexported fields
}
func NewConnManager ¶
func NewConnManager(c Connector, maxWrites int64, pollDuration time.Duration) *ConnManager
func (*ConnManager) Write ¶
func (m *ConnManager) Write(data []byte) error
type Connector ¶
type Connector interface {
Connect() (io.Closer, plumbing.DopplerIngestor_PusherClient, error)
}
type GRPCConnector ¶
type GRPCConnector struct {
// contains filtered or unexported fields
}
func MakeGRPCConnector ¶
func MakeGRPCConnector(fetcher ClientFetcher, balancers []*Balancer) GRPCConnector
func (GRPCConnector) Connect ¶
func (c GRPCConnector) Connect() (io.Closer, plumbing.DopplerIngestor_PusherClient, error)
type HealthRegistrar ¶
type PusherFetcher ¶
type PusherFetcher struct {
// contains filtered or unexported fields
}
func NewPusherFetcher ¶
func NewPusherFetcher(r HealthRegistrar, opts ...grpc.DialOption) *PusherFetcher
func (*PusherFetcher) Fetch ¶
func (p *PusherFetcher) Fetch(addr string) (io.Closer, plumbing.DopplerIngestor_PusherClient, error)
Click to show internal directories.
Click to hide internal directories.