globals

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKubernetesTimeout     = 2 * time.Second
	DefaultArangoDTimeout        = time.Second * 5
	DefaultArangoDAgencyTimeout  = time.Second * 10
	DefaultArangoDCheckTimeout   = time.Second * 2
	DefaultReconciliationTimeout = time.Minute

	// DefaultOutSyncedShardRebuildTimeout
	// timeout after which particular out-synced shard is considered as failed and rebuild is triggered
	DefaultOutSyncedShardRebuildTimeout = time.Minute * 60
	// DefaultOutSyncedShardRebuildRetryTimeout timeout after which rebuild shards retry flow is triggered
	DefaultOutSyncedShardRebuildRetryTimeout = time.Hour * 4

	DefaultKubernetesRequestBatchSize = 256

	DefaultBackupConcurrentUploads = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalBackup

type GlobalBackup interface {
	ConcurrentUploads() Int
}

type GlobalKubernetes

type GlobalKubernetes interface {
	RequestBatchSize() Int64
}

type GlobalTimeouts

type GlobalTimeouts interface {
	Reconciliation() Timeout
	ShardRebuild() Timeout
	ShardRebuildRetry() Timeout

	Kubernetes() Timeout
	ArangoD() Timeout
	ArangoDCheck() Timeout
	Agency() Timeout
}

func GetGlobalTimeouts

func GetGlobalTimeouts() GlobalTimeouts

type Globals

type Globals interface {
	Timeouts() GlobalTimeouts
	Kubernetes() GlobalKubernetes
	Backup() GlobalBackup
}

func GetGlobals

func GetGlobals() Globals

type Int

type Int interface {
	Set(in int)
	Get() int
}

func NewInt

func NewInt(def int) Int

type Int64

type Int64 interface {
	Set(in int64)
	Get() int64
}

func NewInt64

func NewInt64(def int64) Int64

type Timeout

type Timeout interface {
	Set(duration time.Duration)
	Get() time.Duration

	WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)

	Run(run TimeoutRunFunc) error
	RunWithTimeout(ctx context.Context, run TimeoutRunFunc) error
}

func NewTimeout

func NewTimeout(duration time.Duration) Timeout

type TimeoutRunFunc

type TimeoutRunFunc func(ctxChild context.Context) error

Jump to

Keyboard shortcuts

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