Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxGetConnTimeout = 10 * time.Second
)
Variables ¶
View Source
var ( // ErrClusterClosed returned when requested on a closed cluster. ErrClusterClosed = errors.New("cluster closed") // ErrClusterEmpty returned when no connections left in cluster. ErrClusterEmpty = errors.New("cluster empty") // ErrUnknownEndpoint returned when no connections left in cluster. ErrUnknownEndpoint = errors.New("unknown endpoint") )
Functions ¶
func DiffEndpoints ¶
func SortEndpoints ¶
func WithConnConfig ¶
Types ¶
type Cluster ¶
type Cluster interface { Insert(ctx context.Context, endpoint endpoint.Endpoint, opts ...option) Update(ctx context.Context, endpoint endpoint.Endpoint, opts ...option) Get(ctx context.Context) (conn conn.Conn, err error) Pessimize(ctx context.Context, endpoint endpoint.Endpoint) error Close(ctx context.Context) error Remove(ctx context.Context, endpoint endpoint.Endpoint, wg ...option) SetExplorer(repeater repeater.Repeater) Force() }
Click to show internal directories.
Click to hide internal directories.