github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/connection.go (about) 1 package ydb 2 3 import ( 4 "context" 5 6 "github.com/ydb-platform/ydb-go-sdk/v3/coordination" 7 "github.com/ydb-platform/ydb-go-sdk/v3/discovery" 8 "github.com/ydb-platform/ydb-go-sdk/v3/query" 9 "github.com/ydb-platform/ydb-go-sdk/v3/ratelimiter" 10 "github.com/ydb-platform/ydb-go-sdk/v3/scheme" 11 "github.com/ydb-platform/ydb-go-sdk/v3/scripting" 12 "github.com/ydb-platform/ydb-go-sdk/v3/table" 13 "github.com/ydb-platform/ydb-go-sdk/v3/topic" 14 ) 15 16 // Connection interface provide access to YDB service clients 17 // Interface and list of clients may be changed in the future 18 // 19 // Deprecated: use directly *Driver type from ydb.Open instead 20 // 21 //nolint:interfacebloat 22 type Connection interface { 23 // Endpoint returns initial endpoint 24 Endpoint() string 25 26 // Name returns database name 27 Name() string 28 29 // Secure returns true if database connection is secure 30 Secure() bool 31 32 // Close closes connection and clear resources 33 Close(ctx context.Context) error 34 35 // Table returns table client 36 Table() table.Client 37 38 // Query returns query client 39 // 40 // # Experimental 41 // 42 // Notice: This API is EXPERIMENTAL and may be changed or removed in a later release. 43 Query() query.Client 44 45 // Scheme returns scheme client 46 Scheme() scheme.Client 47 48 // Coordination returns coordination client 49 Coordination() coordination.Client 50 51 // Ratelimiter returns ratelimiter client 52 Ratelimiter() ratelimiter.Client 53 54 // Discovery returns discovery client 55 Discovery() discovery.Client 56 57 // Scripting returns scripting client 58 Scripting() scripting.Client 59 60 // Topic returns topic client 61 Topic() topic.Client 62 }