forked from ydb-platform/ydb-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connection.go
60 lines (46 loc) · 1.66 KB
/
connection.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package ydb
import (
"context"
"github.com/ydb-platform/ydb-go-sdk/v3/coordination"
"github.com/ydb-platform/ydb-go-sdk/v3/discovery"
"github.com/ydb-platform/ydb-go-sdk/v3/query"
"github.com/ydb-platform/ydb-go-sdk/v3/ratelimiter"
"github.com/ydb-platform/ydb-go-sdk/v3/scheme"
"github.com/ydb-platform/ydb-go-sdk/v3/scripting"
"github.com/ydb-platform/ydb-go-sdk/v3/table"
"github.com/ydb-platform/ydb-go-sdk/v3/topic"
)
// Connection interface provide access to YDB service clients
// Interface and list of clients may be changed in the future
//
// Deprecated: use Driver instance instead.
// Will be removed at next major release.
// Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
type Connection interface { //nolint:interfacebloat
// Endpoint returns initial endpoint
Endpoint() string
// Name returns database name
Name() string
// Secure returns true if database connection is secure
Secure() bool
// Close closes connection and clear resources
Close(ctx context.Context) error
// Table returns table client
Table() table.Client
// Query returns query client
//
// Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
Query() query.Client
// Scheme returns scheme client
Scheme() scheme.Client
// Coordination returns coordination client
Coordination() coordination.Client
// Ratelimiter returns ratelimiter client
Ratelimiter() ratelimiter.Client
// Discovery returns discovery client
Discovery() discovery.Client
// Scripting returns scripting client
Scripting() scripting.Client
// Topic returns topic client
Topic() topic.Client
}