Documentation ¶
Overview ¶
Example (ListOperations) ¶
ctx := context.TODO() db, err := ydb.Open(ctx, "grpc://localhost:2136/local") if err != nil { panic(err) } defer db.Close(ctx) // cleanup resources operations, err := db.Operation().ListBuildIndex(ctx) if err != nil { panic(err) } fmt.Printf("operations:\n") for _, op := range operations.Operations { fmt.Printf(" - %+v\n", op) }
Output:
Index ¶
- func WithPageSize(pageSize uint64) options.List
- func WithPageToken(pageToken string) options.List
- type Client
- func (c *Client) Cancel(ctx context.Context, opID string) error
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) Forget(ctx context.Context, opID string) error
- func (c *Client) Get(ctx context.Context, opID string) (*operation, error)
- func (c *Client) ListBuildIndex(ctx context.Context) (*listOperations[*metadata.BuildIndex, metadata.BuildIndex], error)
- func (c *Client) ListExecuteQuery(ctx context.Context, opts ...options.List) (*listOperationsWithNextToken[*metadata.ExecuteQuery, metadata.ExecuteQuery], ...)
- func (c *Client) ListExportToS3(ctx context.Context) (*listOperations[*metadata.ExportToS3, metadata.ExportToS3], error)
- func (c *Client) ListExportToYT(ctx context.Context) (*listOperations[*metadata.ExportToYT, metadata.ExportToYT], error)
- func (c *Client) ListImportFromS3(ctx context.Context) (*listOperations[*metadata.ImportFromS3, metadata.ImportFromS3], error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPageSize ¶
func WithPageToken ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an operation service client for manage long operations in YDB
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) Cancel ¶
Cancel starts cancellation of a long-running operation.
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) Forget ¶
Forget forgets long-running operation. It does not cancel the operation and returns an error if operation was not completed.
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) Get ¶
Get returns operation status by ID
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) ListBuildIndex ¶ added in v3.77.1
func (c *Client) ListBuildIndex(ctx context.Context) ( *listOperations[*metadata.BuildIndex, metadata.BuildIndex], error, )
ListBuildIndex returns list of build index operations
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) ListExecuteQuery ¶ added in v3.77.1
func (c *Client) ListExecuteQuery(ctx context.Context, opts ...options.List) ( *listOperationsWithNextToken[*metadata.ExecuteQuery, metadata.ExecuteQuery], error, )
ListExecuteQuery returns list of query executions
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) ListExportToS3 ¶ added in v3.77.1
func (c *Client) ListExportToS3(ctx context.Context) ( *listOperations[*metadata.ExportToS3, metadata.ExportToS3], error, )
ListExportToS3 returns list of export to s3 operations
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) ListExportToYT ¶ added in v3.77.1
func (c *Client) ListExportToYT(ctx context.Context) ( *listOperations[*metadata.ExportToYT, metadata.ExportToYT], error, )
ListExportToYT returns list of export to YT operations
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
func (*Client) ListImportFromS3 ¶ added in v3.77.1
func (c *Client) ListImportFromS3(ctx context.Context) ( *listOperations[*metadata.ImportFromS3, metadata.ImportFromS3], error, )
ListImportFromS3 returns list of import from s3 operations
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental