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
- func WithoutLock() crudOption
- type CRUD
- type CRUDExplorerLocker
- type Cluster
- type Endpoint
- type Explorer
- type Locker
Constants ¶
Variables ¶
var ( // ErrClusterClosed returned when requested on a closed cluster. ErrClusterClosed = fmt.Errorf("cluster closed") // ErrClusterEmpty returned when no connections left in cluster. ErrClusterEmpty = fmt.Errorf("cluster empty") )
Functions ¶
func DiffEndpoints ¶
func SortEndpoints ¶
func WithEndpoint ¶
func WithoutLock ¶
func WithoutLock() crudOption
Types ¶
type CRUD ¶
type CRUD interface { // Insert inserts endpoint to cluster Insert(ctx context.Context, endpoint endpoint.Endpoint, opts ...crudOption) conn.Conn // Update updates endpoint in cluster Update(ctx context.Context, endpoint endpoint.Endpoint, opts ...crudOption) conn.Conn // Remove removes endpoint from cluster Remove(ctx context.Context, endpoint endpoint.Endpoint, opts ...crudOption) conn.Conn // Get gets conn from cluster Get(ctx context.Context, opts ...crudOption) (cc conn.Conn, err error) }
type CRUDExplorerLocker ¶
type Cluster ¶
type Cluster interface { closer.Closer CRUD Explorer Locker conn.PoolGetter conn.Pessimizer }
func New ¶
func New( ctx context.Context, config config.Config, pool conn.Pool, balancer balancer.Balancer, ) Cluster
type Endpoint ¶
type Endpoint interface { NodeID() uint32 }
func ContextEndpoint ¶
type Explorer ¶
type Locker ¶
type Locker interface { Lock() Unlock() }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/cluster/entry |
- Version
- v3.13.3
- Published
- Mar 11, 2022
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- 1 minute ago –
Tools for package owners.