package cluster
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/cluster"
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 CRUD
- type CRUDExplorer
- type Cluster
- type Endpoint
- type Explorer
- type Pessimizer
Constants ¶
Variables ¶
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") // ErrNilBalancerElement returned when requested on a nil Balancer element. ErrNilBalancerElement = errors.New("nil balancer element") // ErrUnknownBalancerElement returned when requested on a unknown Balancer element. ErrUnknownBalancerElement = errors.New("unknown balancer element") // ErrUnknownTypeOfBalancerElement returned when requested on a unknown types of Balancer element. ErrUnknownTypeOfBalancerElement = errors.New("unknown types of balancer element") )
Functions ¶
func DiffEndpoints ¶
func SortEndpoints ¶
func WithEndpoint ¶
Types ¶
type CRUD ¶
type CRUD interface { Insert(ctx context.Context, endpoint endpoint.Endpoint) conn.Conn Update(ctx context.Context, endpoint endpoint.Endpoint) conn.Conn Remove(ctx context.Context, endpoint endpoint.Endpoint) conn.Conn Get(ctx context.Context) (cc conn.Conn, err error) }
type CRUDExplorer ¶
type Cluster ¶
type Cluster interface { closer.Closer CRUD Pessimizer Explorer conn.PoolGetter }
func New ¶
type Endpoint ¶
type Endpoint interface { NodeID() uint32 }
func ContextEndpoint ¶
type Explorer ¶
type Pessimizer ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/cluster/entry |
- Version
- v3.11.2
- Published
- Feb 22, 2022
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 19 minutes ago –
Tools for package owners.