Documentation ¶
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 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))
- type ConnectParams
- type Connection
- type CustomOption
- type Error
- type Level
- type 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 ibalancer.Balancer) Option
- func WithCertificate(cert *x509.Certificate) Option
- func WithCertificatesFromFile(caFile string) Option
- func WithCertificatesFromPem(bytes []byte) Option
- func WithConnectParams(params ConnectParams) Option
- func WithConnectionString(dsn 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 WithLogger(details trace.Details, opts ...LoggerOption) 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 WithTableConfigOption(option tableConfig.Option) Option
- func WithTraceDriver(trace trace.Driver) Option
- func WithTraceTable(trace trace.Table) Option
- func WithUserAgent(userAgent string) Option
Constants ¶
View Source
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) )
View Source
const Version = meta.Version
Version alias for except cycle import
Variables ¶
This section is empty.
Functions ¶
func IsOperationError ¶
func IsOperationErrorAlreadyExistsError ¶ added in v3.5.0
func IsOperationErrorCode ¶ added in v3.5.0
func IsOperationErrorNotFoundError ¶ added in v3.5.0
func IsOperationErrorOverloaded ¶ added in v3.5.0
func IsOperationErrorSchemeError ¶ added in v3.5.0
func IsOperationErrorUnavailable ¶ added in v3.5.0
func IsTimeoutError ¶
func IsTransportError ¶
func IsTransportErrorCancelled ¶ added in v3.4.3
func IsTransportErrorCode ¶ added in v3.5.0
func IsTransportErrorResourceExhausted ¶ added in v3.5.0
func IsYdbError ¶ added in v3.4.2
Types ¶
type ConnectParams ¶
type ConnectParams interface { Endpoint() string Database() string Secure() bool Token() string String() string }
func ConnectionString ¶
func ConnectionString(uri string) (ConnectParams, error)
func EndpointDatabase ¶
func EndpointDatabase(endpoint string, database string, secure bool) ConnectParams
func MustConnectionString ¶
func MustConnectionString(uri string) ConnectParams
type Connection ¶
type Connection interface { db.Connection // 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 discovery client // such as database and access token Scripting(opts ...CustomOption) scripting.Client }
Connection interface provide access to YDB service clients Interface and list of clients may be changed in the future
type CustomOption ¶ added in v3.7.0
type CustomOption func(opts *customOptions)
func WithCustomDatabase ¶ added in v3.7.0
func WithCustomDatabase(database string) CustomOption
func WithCustomToken ¶ added in v3.7.0
func WithCustomToken(accessToken string) CustomOption
func WithCustomUserAgent ¶ added in v3.7.0
func WithCustomUserAgent(userAgent string) CustomOption
type Error ¶ added in v3.4.2
func OperationErrorDescription ¶ added in v3.4.2
func TransportErrorDescription ¶ added in v3.4.2
type LoggerOption ¶ added in v3.5.3
func WithErrWriter ¶ added in v3.5.0
func WithErrWriter(err io.Writer) LoggerOption
func WithExternalLogger ¶ added in v3.5.0
func WithExternalLogger(external log.Logger) LoggerOption
func WithMinLevel ¶ added in v3.3.0
func WithMinLevel(minLevel Level) LoggerOption
func WithNamespace ¶ added in v3.3.0
func WithNamespace(namespace string) LoggerOption
func WithNoColor ¶ added in v3.3.0
func WithNoColor(b bool) LoggerOption
func WithOutWriter ¶ added in v3.5.0
func WithOutWriter(out io.Writer) LoggerOption
type Option ¶
func MergeOptions ¶ added in v3.5.1
func WithAnonymousCredentials ¶
func WithAnonymousCredentials() Option
func WithBalancer ¶ added in v3.6.0
func WithCertificate ¶
func WithCertificate(cert *x509.Certificate) Option
func WithCertificatesFromPem ¶
func WithConnectParams ¶
func WithConnectParams(params ConnectParams) Option
func WithConnectionString ¶
func WithConnectionTTL ¶ added in v3.7.0
func WithCreateCredentialsFunc ¶
func WithCreateCredentialsFunc(createCredentials func(ctx context.Context) (credentials.Credentials, error)) Option
func WithCredentials ¶
func WithCredentials(c credentials.Credentials) Option
func WithDatabase ¶ added in v3.2.1
func WithDialTimeout ¶
func WithDiscoveryInterval ¶
func WithEndpoint ¶ added in v3.2.1
func WithLogger ¶ added in v3.3.0
func WithLogger(details trace.Details, opts ...LoggerOption) Option
func WithSecure ¶ added in v3.7.0
func WithTableConfigOption ¶
func WithTableConfigOption(option tableConfig.Option) Option
func WithTraceDriver ¶
WithTraceDriver returns deadline which has associated Driver with it.
func WithTraceTable ¶
WithTraceTable returns deadline which has associated Driver with it.
func WithUserAgent ¶ added in v3.7.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.