package cluster

import "github.com/ydb-platform/ydb-go-sdk/v3/cluster"

Index

Functions

func WithEndpoint

func WithEndpoint(ctx context.Context, endpoint Endpoint) context.Context

Types

type Cluster

type Cluster interface {
	// ClientConnInterface interface allows Cluster use as grpc.ClientConnInterface
	// with lazy getting raw grpc-connection in Invoke() or NewStream() stages.
	// Lazy getting grpc-connection must use for embedded client-side balancing
	// DB may be put into code-generated client constructor as is.
	grpc.ClientConnInterface

	// Close clears resources and close all connections to YDB
	Close(ctx context.Context) error
}

type Endpoint

type Endpoint interface {
	NodeID() uint32
}

func ContextEndpoint

func ContextEndpoint(ctx context.Context) (e Endpoint, ok bool)

Source Files

cluster.go context.go

Version
v3.4.4
Published
Dec 9, 2021
Platform
linux/amd64
Imports
2 packages
Last checked
4 minutes ago

Tools for package owners.