-
Notifications
You must be signed in to change notification settings - Fork 77
/
connection.go
54 lines (41 loc) · 1.46 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
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/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
// 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
}