package operation
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/operation"
Index ¶
- func ContextCancelAfter(ctx context.Context) (d time.Duration, ok bool)
- func ContextTimeout(ctx context.Context) (d time.Duration, ok bool)
- func SetOperationParams(req interface{}, params Params)
- func WithCancelAfter(ctx context.Context, d time.Duration) context.Context
- func WithMode(ctx context.Context, m Mode) context.Context
- func WithTimeout(ctx context.Context, d time.Duration) context.Context
- type Mode
- type ModeInterface
- type Params
Functions ¶
func ContextCancelAfter ¶
ContextCancelAfter returns the timeout within given deadline after which YDB should try to cancel operation and return result regardless of the cancelation.
func ContextTimeout ¶
ContextTimeout returns the timeout within given deadline after which YDB should try to cancel operation and return result regardless of the cancelation.
func SetOperationParams ¶
func SetOperationParams(req interface{}, params Params)
func WithCancelAfter ¶
WithCancelAfter returns a copy of parent deadline in which YDB operation cancel after parameter is set to d. If parent deadline cancelation timeout is smaller than d, parent deadline deadline is returned.
func WithMode ¶
WithMode returns a copy of parent deadline in which YDB operation mode parameter is set to m. If parent deadline mode is set and is not equal to m, WithMode will panic.
func WithTimeout ¶
WithTimeout returns a copy of parent deadline in which YDB operation timeout parameter is set to d. If parent deadline timeout is smaller than d, parent deadline is returned.
Types ¶
type Mode ¶
type Mode uint
func ContextMode ¶
ContextMode returns the mode of YDB operation within given deadline.
func (Mode) String ¶
type ModeInterface ¶
type ModeInterface interface { String() string }
type Params ¶
func ContextParams ¶
func (Params) Empty ¶
func (Params) GetCancelAfter ¶
func (Params) GetMode ¶
func (Params) GetTimeout ¶
Source Files ¶
context.go mode.go params.go timeout.go
- Version
- v3.5.4
- Published
- Jan 3, 2022
- Platform
- darwin/amd64
- Imports
- 6 packages
- Last checked
- 17 seconds ago –
Tools for package owners.