common

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package common provides implementation of some of the basic functionalities to be used in application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRetry

func GetRetry(ctx context.Context) uint

func IncreaseRetry

func IncreaseRetry(ctx context.Context) context.Context

Types

type Cancelable

type Cancelable struct {
	// contains filtered or unexported fields
}

func (*Cancelable) Cancel

func (c *Cancelable) Cancel()

func (*Cancelable) SetCancel

func (c *Cancelable) SetCancel(cancel func())

type Hooked

type Hooked struct {
	// contains filtered or unexported fields
}

func (*Hooked) DoDoneHooks

func (h *Hooked) DoDoneHooks(ctx context.Context) []error

func (*Hooked) DoFailHooks

func (h *Hooked) DoFailHooks(ctx context.Context) []error

func (*Hooked) SetDoneHooks

func (h *Hooked) SetDoneHooks(hooks []abstraction.Executable)

func (*Hooked) SetFailHooks

func (h *Hooked) SetFailHooks(failHooks []abstraction.Executable)

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

func (*Retry) SetMaxRetry

func (r *Retry) SetMaxRetry(retries uint)

func (*Retry) SetRetryDelay

func (r *Retry) SetRetryDelay(retryDelay time.Duration)

func (*Retry) WaitForRetry

func (r *Retry) WaitForRetry(ctx context.Context) error

type Timeout

type Timeout struct {
	// contains filtered or unexported fields
}

func (*Timeout) ApplyTimeout

func (t *Timeout) ApplyTimeout(ctx context.Context) (context.Context, func())

func (*Timeout) SetTimeout

func (t *Timeout) SetTimeout(timeout time.Duration)

Jump to

Keyboard shortcuts

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