package conn
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/conn"
Index ¶
- Constants
- func IsBadConn(err error, goodConnCodes ...grpcCodes.Code) bool
- func UseWrapping(ctx context.Context) bool
- func WithAppendOptions(cc grpc.ClientConnInterface, appendOpts ...grpc.CallOption) grpc.ClientConnInterface
- func WithBeforeFunc( cc grpc.ClientConnInterface, before func(), ) grpc.ClientConnInterface
- func WithContextModifier( cc grpc.ClientConnInterface, modifyCtx func(ctx context.Context) context.Context, ) grpc.ClientConnInterface
- func WithoutWrapping(ctx context.Context) context.Context
- type Config
- type Conn
- type Pool
- func NewPool(ctx context.Context, config Config) *Pool
- func (p *Pool) Allow(ctx context.Context, cc Conn)
- func (p *Pool) Ban(ctx context.Context, cc Conn, cause error)
- func (p *Pool) Get(endpoint endpoint.Endpoint) Conn
- func (p *Pool) Release(ctx context.Context) (finalErr error)
- func (p *Pool) Take(context.Context) error
- type State
Constants ¶
Functions ¶
func IsBadConn ¶
func UseWrapping ¶
func WithAppendOptions ¶
func WithAppendOptions(cc grpc.ClientConnInterface, appendOpts ...grpc.CallOption) grpc.ClientConnInterface
func WithBeforeFunc ¶
func WithBeforeFunc( cc grpc.ClientConnInterface, before func(), ) grpc.ClientConnInterface
func WithContextModifier ¶
func WithContextModifier( cc grpc.ClientConnInterface, modifyCtx func(ctx context.Context) context.Context, ) grpc.ClientConnInterface
func WithoutWrapping ¶
Types ¶
type Config ¶
type Config interface { DialTimeout() time.Duration ConnectionTTL() time.Duration Trace() *trace.Driver GrpcDialOptions() []grpc.DialOption }
type Conn ¶
type Conn interface { grpc.ClientConnInterface Endpoint() endpoint.Endpoint LastUsage() time.Time Ping(ctx context.Context) error IsState(states ...State) bool GetState() State SetState(ctx context.Context, state State) State Unban(ctx context.Context) State }
func New ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func (*Pool) Allow ¶
func (*Pool) Ban ¶
func (*Pool) Get ¶
func (*Pool) Release ¶
func (*Pool) Take ¶
type State ¶
type State int8
func (State) Code ¶
func (State) IsValid ¶
func (State) String ¶
Source Files ¶
config.go conn.go context.go errors.go grpc_client_stream.go middleware.go pool.go state.go
- Version
- v3.80.6
- Published
- Sep 17, 2024
- Platform
- js/wasm
- Imports
- 21 packages
- Last checked
- 1 minute ago –
Tools for package owners.