operation

package
v3.57.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelAfter added in v3.18.0

func CancelAfter(ctx context.Context) (d time.Duration, ok bool)

CancelAfter returns the timeout within given context after which YDB should try to cancel operation and return result regardless of the cancellation.

func Params

func Params(
	ctx context.Context,
	timeout time.Duration,
	cancelAfter time.Duration,
	mode Mode,
) *Ydb_Operations.OperationParams

func Timeout added in v3.18.0

func Timeout(ctx context.Context) (d time.Duration, ok bool)

Timeout returns the timeout within given context after which YDB should try to cancel operation and return result regardless of the cancelation.

func WithCancelAfter

func WithCancelAfter(ctx context.Context, operationCancelAfter time.Duration) context.Context

WithCancelAfter returns a copy of parent context in which YDB operation cancel after parameter is set to d. If parent context cancellation timeout is smaller than d, parent context is returned.

func WithTimeout

func WithTimeout(ctx context.Context, operationTimeout time.Duration) context.Context

WithTimeout returns a copy of parent context in which YDB operation timeout parameter is set to d. If parent context timeout is smaller than d, parent context is returned.

Types

type Mode

type Mode uint
const (
	ModeUnknown Mode = iota
	ModeSync
	ModeAsync
)

func (Mode) String

func (m Mode) String() string

type Status added in v3.21.0

type Status interface {
	GetStatus() Ydb.StatusIds_StatusCode
	GetIssues() []*Ydb_Issue.IssueMessage
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL