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 ClientFetcher interface {
Fetch(addr string) (conn io.Closer, client loggregator_v2.Ingress_BatchSenderClient, err error)
}
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func New ¶
func New(conns ...Conn) *ClientPool
func (*ClientPool) Write ¶
func (c *ClientPool) Write(msgs []*loggregator_v2.Envelope) error
type Conn ¶
type Conn interface {
Write(data []*loggregator_v2.Envelope) (err 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(envelopes []*loggregator_v2.Envelope) error
type Connector ¶
type Connector interface {
Connect() (io.Closer, loggregator_v2.Ingress_BatchSenderClient, 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, loggregator_v2.Ingress_BatchSenderClient, error)
type MetricClient ¶
type MetricClient interface {
NewGauge(name string, opts ...metrics.MetricOption) metrics.Gauge
}
type SenderFetcher ¶
type SenderFetcher struct {
// contains filtered or unexported fields
}
func NewSenderFetcher ¶
func NewSenderFetcher(mc MetricClient, opts ...grpc.DialOption) *SenderFetcher
func (*SenderFetcher) Fetch ¶
func (p *SenderFetcher) Fetch(addr string) (io.Closer, loggregator_v2.Ingress_BatchSenderClient, error)
Click to show internal directories.
Click to hide internal directories.