Documentation ¶
Index ¶
- Constants
- Variables
- func DiffEndpoints(curr, next []endpoint.Endpoint, eq, add, del func(i, j int))
- func SortEndpoints(es []endpoint.Endpoint)
- func WithEndpoint(ctx context.Context, endpoint Endpoint) context.Context
- type Cluster
- func (c *Cluster) Close(ctx context.Context) (err error)
- func (c *Cluster) Force()
- func (c *Cluster) Get(ctx context.Context) (cc conn.Conn, err error)
- func (c *Cluster) Insert(ctx context.Context, e endpoint.Endpoint, opts ...CrudOption)
- func (c *Cluster) Pessimize(ctx context.Context, cc conn.Conn, cause error)
- func (c *Cluster) Remove(ctx context.Context, e endpoint.Endpoint, opts ...CrudOption)
- func (c *Cluster) SetExplorer(repeater repeater.Repeater)
- type CrudOption
- type Endpoint
- type Explorer
- type Getter
- type Inserter
- type Remover
Constants ¶
View Source
const (
MaxGetConnTimeout = 10 * time.Second
)
Variables ¶
Functions ¶
func DiffEndpoints ¶
func SortEndpoints ¶
Types ¶
type Cluster ¶
func (*Cluster) Get ¶
Get returns next available connection. It returns error on given deadline cancellation or when cluster become closed.
func (*Cluster) SetExplorer ¶
type CrudOption ¶ added in v3.21.0
type CrudOption func(h *crudOptionsHolder)
func WithoutLock ¶ added in v3.11.4
func WithoutLock() CrudOption
Click to show internal directories.
Click to hide internal directories.