options

package
v3.39.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AcquireTypeAcquire = AcquireType(iota)
	AcquireTypeReport

	AcquireTypeDefault = AcquireTypeAcquire
)
View Source
const (
	DefaultDecrease = 100 * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Acquire

type Acquire interface {
	// Type defines type of acquire request
	Type() AcquireType

	// OperationTimeout defines operation Timeout for acquire request
	OperationTimeout() time.Duration

	// OperationCancelAfter defines operation CancelAfter for acquire request
	OperationCancelAfter() time.Duration
}

func NewAcquire

func NewAcquire(opts ...AcquireOption) Acquire

type AcquireOption

type AcquireOption func(h *acquireOptionsHolder)

func WithAcquire

func WithAcquire() AcquireOption

func WithOperationCancelAfter

func WithOperationCancelAfter(operationCancelAfter time.Duration) AcquireOption

func WithOperationTimeout

func WithOperationTimeout(operationTimeout time.Duration) AcquireOption

func WithReport

func WithReport() AcquireOption

type AcquireType

type AcquireType uint8

Jump to

Keyboard shortcuts

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