Documentation ¶
Index ¶
- type Counter
- type Endpoint
- type EndpointIterator
- type LeastConnection
- type Pool
- func (p *Pool) ContextPath() string
- func (p *Pool) Each(f func(endpoint *Endpoint))
- func (p *Pool) Endpoints(defaultLoadBalance, initial string) EndpointIterator
- func (p *Pool) FindById(id string) *Endpoint
- func (p *Pool) IsEmpty() bool
- func (p *Pool) MarkUpdated(t time.Time)
- func (p *Pool) MarshalJSON() ([]byte, error)
- func (p *Pool) PruneEndpoints(defaultThreshold time.Duration) []*Endpoint
- func (p *Pool) Put(endpoint *Endpoint) bool
- func (p *Pool) Remove(endpoint *Endpoint) bool
- func (p *Pool) RouteServiceUrl() string
- type RoundRobin
- type Stats
- type Uri
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { ApplicationId string Address string Port uint16 Tags map[string]string PrivateInstanceId string RouteServiceUrl string PrivateInstanceIndex string ModificationTag models.ModificationTag Stats *Stats // contains filtered or unexported fields }
func NewEndpoint ¶
func (*Endpoint) CanonicalAddr ¶
func (*Endpoint) MarshalJSON ¶
type EndpointIterator ¶
type EndpointIterator interface { Next() *Endpoint EndpointFailed() PreRequest(e *Endpoint) PostRequest(e *Endpoint) }
func NewLeastConnection ¶
func NewLeastConnection(p *Pool, initial string) EndpointIterator
func NewRoundRobin ¶
func NewRoundRobin(p *Pool, initial string) EndpointIterator
type LeastConnection ¶
type LeastConnection struct {
// contains filtered or unexported fields
}
func (*LeastConnection) EndpointFailed ¶
func (r *LeastConnection) EndpointFailed()
func (*LeastConnection) Next ¶
func (r *LeastConnection) Next() *Endpoint
func (*LeastConnection) PostRequest ¶
func (r *LeastConnection) PostRequest(e *Endpoint)
func (*LeastConnection) PreRequest ¶
func (r *LeastConnection) PreRequest(e *Endpoint)
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) ContextPath ¶
func (*Pool) Endpoints ¶
func (p *Pool) Endpoints(defaultLoadBalance, initial string) EndpointIterator
func (*Pool) MarkUpdated ¶
func (*Pool) MarshalJSON ¶
func (*Pool) PruneEndpoints ¶
func (*Pool) RouteServiceUrl ¶
type RoundRobin ¶
type RoundRobin struct {
// contains filtered or unexported fields
}
func (*RoundRobin) EndpointFailed ¶
func (r *RoundRobin) EndpointFailed()
func (*RoundRobin) Next ¶
func (r *RoundRobin) Next() *Endpoint
func (*RoundRobin) PostRequest ¶
func (r *RoundRobin) PostRequest(e *Endpoint)
func (*RoundRobin) PreRequest ¶
func (r *RoundRobin) PreRequest(e *Endpoint)
Click to show internal directories.
Click to hide internal directories.