package ydb
import "github.com/ydb-platform/ydb-go-sdk/v3"
Index ¶
- Constants
- func IsOperationError(err error) bool
- func IsOperationErrorAlreadyExistsError(err error) bool
- func IsOperationErrorCode(err error, codes ...int32) bool
- func IsOperationErrorNotFoundError(err error) bool
- func IsOperationErrorOverloaded(err error) bool
- func IsOperationErrorSchemeError(err error) bool
- func IsOperationErrorUnavailable(err error) bool
- func IsRatelimiterAcquireError(err error) bool
- func IsTimeoutError(err error) bool
- func IsTransportError(err error) bool
- func IsTransportErrorCancelled(err error) bool
- func IsTransportErrorCode(err error, codes ...int32) bool
- func IsTransportErrorResourceExhausted(err error) bool
- func IsYdbError(err error) bool
- func IterateByIssues(err error, it func(message string, code uint32, severity uint32))
- func RegisterParser(param string, parser func(value string) ([]config.Option, error)) (err error)
- func ToRatelimiterAcquireError(err error) ratelimiter.AcquireError
- type Connection
- type CustomOption
- func WithCustomCredentials(creds credentials.Credentials) CustomOption
- func WithCustomDatabase(database string) CustomOption
- func WithCustomToken(accessToken string) CustomOption
- func WithCustomUserAgent(userAgent string) CustomOption
- type Error
- type Level
- type LoggerOption
- func WithErrWriter(err io.Writer) LoggerOption
- func WithExternalLogger(external log.Logger) LoggerOption
- func WithMinLevel(minLevel Level) LoggerOption
- func WithNamespace(namespace string) LoggerOption
- func WithNoColor(b bool) LoggerOption
- func WithOutWriter(out io.Writer) LoggerOption
- type Option
- func MergeOptions(options ...Option) Option
- func With(options ...config.Option) Option
- func WithAccessTokenCredentials(accessToken string) Option
- func WithAnonymousCredentials() Option
- func WithBalancer(balancer balancer.Balancer) Option
- func WithCertificate(cert *x509.Certificate) Option
- func WithCertificatesFromFile(caFile string) Option
- func WithCertificatesFromPem(bytes []byte) Option
- func WithConnectionString(connectionString string) Option
- func WithConnectionTTL(ttl time.Duration) Option
- func WithCreateCredentialsFunc(createCredentials func(ctx context.Context) (credentials.Credentials, error)) Option
- func WithCredentials(c credentials.Credentials) Option
- func WithDatabase(database string) Option
- func WithDialTimeout(timeout time.Duration) Option
- func WithDiscoveryInterval(discoveryInterval time.Duration) Option
- func WithEndpoint(endpoint string) Option
- func WithInsecure() Option
- func WithLogger(details trace.Details, opts ...LoggerOption) Option
- func WithMinTLSVersion(minVersion uint16) Option
- func WithRatelimiterOptions(opts ...ratelimiterConfig.Option) Option
- func WithSecure(secure bool) Option
- func WithSessionPoolCreateSessionTimeout(createSessionTimeout time.Duration) Option
- func WithSessionPoolDeleteTimeout(deleteTimeout time.Duration) Option
- func WithSessionPoolIdleThreshold(idleThreshold time.Duration) Option
- func WithSessionPoolKeepAliveMinSize(keepAliveMinSize int) Option
- func WithSessionPoolKeepAliveTimeout(keepAliveTimeout time.Duration) Option
- func WithSessionPoolSizeLimit(sizeLimit int) Option
- func WithTLSSInsecureSkipVerify() Option
- func WithTableConfigOption(option tableConfig.Option) Option
- func WithTraceCoordination(trace trace.Coordination) Option
- func WithTraceDiscovery(trace trace.Discovery) Option
- func WithTraceDriver(trace trace.Driver) Option
- func WithTraceRatelimiter(trace trace.Ratelimiter) Option
- func WithTraceScheme(trace trace.Scheme) Option
- func WithTraceScripting(trace trace.Scripting) Option
- func WithTraceTable(trace trace.Table) Option
- func WithUserAgent(userAgent string) Option
Constants ¶
const ( MetaRequestType = meta.HeaderRequestType MetaTraceID = meta.HeaderTraceID )
const ( QUIET = Level(logger.QUIET) TRACE = Level(logger.TRACE) DEBUG = Level(logger.DEBUG) INFO = Level(logger.INFO) WARN = Level(logger.WARN) ERROR = Level(logger.ERROR) FATAL = Level(logger.FATAL) )
Version alias for except cycle import
Functions ¶
func IsOperationError ¶
func IsOperationErrorAlreadyExistsError ¶
func IsOperationErrorCode ¶
func IsOperationErrorNotFoundError ¶
func IsOperationErrorOverloaded ¶
func IsOperationErrorSchemeError ¶
func IsOperationErrorUnavailable ¶
func IsRatelimiterAcquireError ¶
func IsTimeoutError ¶
func IsTransportError ¶
func IsTransportErrorCancelled ¶
func IsTransportErrorCode ¶
func IsTransportErrorResourceExhausted ¶
func IsYdbError ¶
func IterateByIssues ¶
func RegisterParser ¶
func ToRatelimiterAcquireError ¶
func ToRatelimiterAcquireError(err error) ratelimiter.AcquireError
Types ¶
type Connection ¶
type Connection interface { closer.Closer db.ConnectionInfo grpc.ClientConnInterface // Table returns table client with options from Connection instance. // Options provide options replacement for requested table client // such as database and access token Table(opts ...CustomOption) table.Client // Scheme returns scheme client with options from Connection instance. // Options provide options replacement for requested scheme client // such as database and access token Scheme(opts ...CustomOption) scheme.Client // Coordination returns coordination client with options from Connection instance. // Options provide options replacement for requested coordination client // such as database and access token Coordination(opts ...CustomOption) coordination.Client // Ratelimiter returns rate limiter client with options from Connection instance. // Options provide options replacement for requested rate limiter client // such as database and access token Ratelimiter(opts ...CustomOption) ratelimiter.Client // Discovery returns discovery client with options from Connection instance. // Options provide options replacement for requested discovery client // such as database and access token Discovery(opts ...CustomOption) discovery.Client // Scripting returns scripting client with options from Connection instance. // Options provide options replacement for requested scripting client // such as database and access token Scripting(opts ...CustomOption) scripting.Client // With returns Connection specified with custom options // Options provide options replacement for all clients taked from new Connection With(opts ...CustomOption) Connection }
Connection interface provide access to YDB service clients Interface and list of clients may be changed in the future
func New ¶
func New(ctx context.Context, opts ...Option) (_ Connection, err error)
New connects to name and return name runtime holder
type CustomOption ¶
type CustomOption func(opts *customOptions)
func WithCustomCredentials ¶
func WithCustomCredentials(creds credentials.Credentials) CustomOption
func WithCustomDatabase ¶
func WithCustomDatabase(database string) CustomOption
func WithCustomToken ¶
func WithCustomToken(accessToken string) CustomOption
func WithCustomUserAgent ¶
func WithCustomUserAgent(userAgent string) CustomOption
type Error ¶
func OperationErrorDescription ¶
func TransportErrorDescription ¶
type Level ¶
type LoggerOption ¶
func WithErrWriter ¶
func WithErrWriter(err io.Writer) LoggerOption
func WithExternalLogger ¶
func WithExternalLogger(external log.Logger) LoggerOption
func WithMinLevel ¶
func WithMinLevel(minLevel Level) LoggerOption
func WithNamespace ¶
func WithNamespace(namespace string) LoggerOption
func WithNoColor ¶
func WithNoColor(b bool) LoggerOption
func WithOutWriter ¶
func WithOutWriter(out io.Writer) LoggerOption
type Option ¶
func MergeOptions ¶
func With ¶
func WithAccessTokenCredentials ¶
func WithAnonymousCredentials ¶
func WithAnonymousCredentials() Option
func WithBalancer ¶
func WithCertificate ¶
func WithCertificate(cert *x509.Certificate) Option
func WithCertificatesFromFile ¶
func WithCertificatesFromPem ¶
func WithConnectionString ¶
WithConnectionString accept connection string like 'grpc[s]://{endpoint}/?database={database}'
func WithConnectionTTL ¶
func WithCreateCredentialsFunc ¶
func WithCreateCredentialsFunc(createCredentials func(ctx context.Context) (credentials.Credentials, error)) Option
func WithCredentials ¶
func WithCredentials(c credentials.Credentials) Option
func WithDatabase ¶
func WithDialTimeout ¶
func WithDiscoveryInterval ¶
func WithEndpoint ¶
func WithInsecure ¶
func WithInsecure() Option
func WithLogger ¶
func WithLogger(details trace.Details, opts ...LoggerOption) Option
func WithMinTLSVersion ¶
func WithRatelimiterOptions ¶
func WithRatelimiterOptions(opts ...ratelimiterConfig.Option) Option
func WithSecure ¶
func WithSessionPoolCreateSessionTimeout ¶
func WithSessionPoolDeleteTimeout ¶
func WithSessionPoolIdleThreshold ¶
func WithSessionPoolKeepAliveMinSize ¶
func WithSessionPoolKeepAliveTimeout ¶
func WithSessionPoolSizeLimit ¶
func WithTLSSInsecureSkipVerify ¶
func WithTLSSInsecureSkipVerify() Option
func WithTableConfigOption ¶
func WithTableConfigOption(option tableConfig.Option) Option
func WithTraceCoordination ¶
func WithTraceCoordination(trace trace.Coordination) Option
WithTraceCoordination returns coordination trace option
func WithTraceDiscovery ¶
WithTraceDiscovery returns discovery trace option
func WithTraceDriver ¶
WithTraceDriver returns deadline which has associated Driver with it.
func WithTraceRatelimiter ¶
func WithTraceRatelimiter(trace trace.Ratelimiter) Option
WithTraceRatelimiter returns ratelimiter trace option
func WithTraceScheme ¶
WithTraceScheme returns scheme trace option
func WithTraceScripting ¶
WithTraceScripting scripting trace option
func WithTraceTable ¶
WithTraceTable returns table trace option
func WithUserAgent ¶
Source Files ¶
connection.go custom_options.go errors.go meta.go options.go proxy.go version.go
Directories ¶
- Version
- v3.11.8-rc6
- Published
- Feb 26, 2022
- Platform
- darwin/amd64
- Imports
- 40 packages
- Last checked
- now –
Tools for package owners.