Documentation ¶
Index ¶
- func BigDelay() time.Duration
- func CommunicationTimeout() time.Duration
- func ConnectionTimeout() time.Duration
- func ContextTimeout() time.Duration
- func DefaultDelay() time.Duration
- func ExecutionTimeout() time.Duration
- func FormatDuration(dur time.Duration) string
- func HostCleanupTimeout() time.Duration
- func HostCreationTimeout() time.Duration
- func HostLongOperationTimeout() time.Duration
- func HostOperationTimeout() time.Duration
- func MaxTimeout(a time.Duration, b time.Duration) time.Duration
- func MetadataReadAfterWriteTimeout() time.Duration
- func MetadataTimeout() time.Duration
- func MinDelay() time.Duration
- func NormalDelay() time.Duration
- func OperationTimeout() time.Duration
- func SSHConnectionTimeout() time.Duration
- func SmallDelay() time.Duration
- type Delays
- type MutableTimings
- func (t *MutableTimings) BigDelay() time.Duration
- func (t *MutableTimings) CommunicationTimeout() time.Duration
- func (t *MutableTimings) ConnectionTimeout() time.Duration
- func (t *MutableTimings) ContextTimeout() time.Duration
- func (t *MutableTimings) ExecutionTimeout() time.Duration
- func (t *MutableTimings) HostCleanupTimeout() time.Duration
- func (t *MutableTimings) HostCreationTimeout() time.Duration
- func (t *MutableTimings) HostLongOperationTimeout() time.Duration
- func (t *MutableTimings) HostOperationTimeout() time.Duration
- func (t *MutableTimings) MetadataReadAfterWriteTimeout() time.Duration
- func (t *MutableTimings) MetadataTimeout() time.Duration
- func (t *MutableTimings) NormalDelay() time.Duration
- func (t *MutableTimings) OperationTimeout() time.Duration
- func (t *MutableTimings) SSHConnectionTimeout() time.Duration
- func (t *MutableTimings) SmallDelay() time.Duration
- func (t MutableTimings) ToToml() (string, error)
- func (t *MutableTimings) Update(a *MutableTimings) error
- type Stopwatch
- type Timeouts
- type Timings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommunicationTimeout ¶ added in v21.11.1
CommunicationTimeout ...
func ConnectionTimeout ¶ added in v21.11.1
ConnectionTimeout ...
func ExecutionTimeout ¶ added in v21.11.1
ExecutionTimeout ...
func HostCreationTimeout ¶ added in v21.11.1
HostCreationTimeout ...
func HostLongOperationTimeout ¶ added in v21.11.1
HostLongOperationTimeout ...
func HostOperationTimeout ¶ added in v21.11.1
HostOperationTimeout ...
func MaxTimeout ¶
MaxTimeout return the maximum of timeouts 'a' and 'b'
func MetadataReadAfterWriteTimeout ¶ added in v21.11.1
MetadataReadAfterWriteTimeout ...
func NormalDelay ¶ added in v21.11.1
NormalDelay returns the duration for a normal delay
func OperationTimeout ¶ added in v21.11.1
OperationTimeout ...
func SSHConnectionTimeout ¶ added in v21.11.1
SSHConnectionTimeout ...
Types ¶
type MutableTimings ¶ added in v21.11.1
type MutableTimings struct { Timeouts `json:"timeouts" mapstructure:"timeouts"` Delays `json:"delays" mapstructure:"delays"` }
func NewTimings ¶ added in v21.11.1
func NewTimings() *MutableTimings
NewTimings creates a new instance of MutableTimings with default values
func (*MutableTimings) BigDelay ¶ added in v21.11.1
func (t *MutableTimings) BigDelay() time.Duration
BigDelay returns the duration of a big delay
func (*MutableTimings) CommunicationTimeout ¶ added in v21.11.1
func (t *MutableTimings) CommunicationTimeout() time.Duration
CommunicationTimeout returns the configured timeout for communication (optionally overloaded from ENV)
func (*MutableTimings) ConnectionTimeout ¶ added in v21.11.1
func (t *MutableTimings) ConnectionTimeout() time.Duration
ConnectionTimeout returns the configured timeout for connection
func (*MutableTimings) ContextTimeout ¶ added in v21.11.1
func (t *MutableTimings) ContextTimeout() time.Duration
ContextTimeout returns the configured timeout for context (optionally overloaded from ENV)
func (*MutableTimings) ExecutionTimeout ¶ added in v21.11.1
func (t *MutableTimings) ExecutionTimeout() time.Duration
ExecutionTimeout returns the configured timeout for execution
func (*MutableTimings) HostCleanupTimeout ¶ added in v21.11.1
func (t *MutableTimings) HostCleanupTimeout() time.Duration
HostCleanupTimeout returns the configured timeout for host cleanup
func (*MutableTimings) HostCreationTimeout ¶ added in v21.11.1
func (t *MutableTimings) HostCreationTimeout() time.Duration
HostCreationTimeout returns the configured timeout for host creation (optionally overloaded from ENV)
func (*MutableTimings) HostLongOperationTimeout ¶ added in v21.11.1
func (t *MutableTimings) HostLongOperationTimeout() time.Duration
HostLongOperationTimeout returns the configured timeout for long Host operation (optionally overloaded from ENV)
func (*MutableTimings) HostOperationTimeout ¶ added in v21.11.1
func (t *MutableTimings) HostOperationTimeout() time.Duration
HostOperationTimeout returns the configured timeout for host operation (other than creation or cleanup)
func (*MutableTimings) MetadataReadAfterWriteTimeout ¶ added in v21.11.1
func (t *MutableTimings) MetadataReadAfterWriteTimeout() time.Duration
MetadataReadAfterWriteTimeout returns the configured timeout for metadata read after write
func (*MutableTimings) MetadataTimeout ¶ added in v21.11.1
func (t *MutableTimings) MetadataTimeout() time.Duration
MetadataTimeout returns the configured timeout for metadata access
func (*MutableTimings) NormalDelay ¶ added in v21.11.1
func (t *MutableTimings) NormalDelay() time.Duration
NormalDelay returns the duration of a normal delay
func (*MutableTimings) OperationTimeout ¶ added in v21.11.1
func (t *MutableTimings) OperationTimeout() time.Duration
OperationTimeout returns the configured timeout for operation (optionally overloaded from ENV)
func (*MutableTimings) SSHConnectionTimeout ¶ added in v21.11.1
func (t *MutableTimings) SSHConnectionTimeout() time.Duration
SSHConnectionTimeout returns the configured timeout for SSH connection
func (*MutableTimings) SmallDelay ¶ added in v21.11.1
func (t *MutableTimings) SmallDelay() time.Duration
SmallDelay returns the duration of a small delay
func (MutableTimings) ToToml ¶ added in v21.11.1
func (t MutableTimings) ToToml() (string, error)
func (*MutableTimings) Update ¶ added in v21.11.1
func (t *MutableTimings) Update(a *MutableTimings) error
type Stopwatch ¶
type Stopwatch interface { // Start starts the stopwatch, either for the first time or after a Pause() Start() // Stop stops definitively the stopwatch, disabling the ability to start it again Stop() // Pause stops temporarily the stopwatch, allowing to start it again, suming up the time intervals Pause() // GetDuration returns the current elapsed time measured by the Stopwatch GetDuration() time.Duration // String returns a printable representation of the current elapsed time String() string // OnExitLogWithLevel returns a function that will log start and end of Stopwatch, intended tto be used with defer OnExitLogWithLevel(in, out string, level logrus.Level) func() OnExitLogInfo(in, out string) func() }
Stopwatch interface to expose methods available for a stopwatch
func NewStopwatch ¶
func NewStopwatch() Stopwatch
NewStopwatch creates a object satisfying interface Stopwatch
type Timeouts ¶ added in v21.11.1
type Timeouts struct { Communication time.Duration `json:"timeout_communication,omitempty" mapstructure:"communication"` Connection time.Duration `json:"timeout_connection,omitempty" mapstructure:"connection"` Context time.Duration `json:"timeout_context,omitempty" mapstructure:"context"` HostCreation time.Duration `json:"timeout_host_creation,omitempty" mapstructure:"hostcreation"` HostCleanup time.Duration `json:"timeout_host_cleanup,omitempty" mapstructure:"hostcleanup"` HostOperation time.Duration `json:"timeout_host_operation,omitempty" mapstructure:"hostoperation"` HostLongOperation time.Duration `json:"timeout_host_long_operation,omitempty" mapstructure:"hostlongoperation"` Operation time.Duration `json:"timeout_operation,omitempty" mapstructure:"operation"` SSHConnection time.Duration `json:"timeout_ssh_connection,omitempty" mapstructure:"sshconnection"` Metadata time.Duration `json:"timeout_metadata,omitempty" mapstructure:"metadata"` MetadataReadAfterWrite time.Duration `json:"timeout_metadata_raw,omitempty" mapstructure:"metadatareadafterwrite"` }
type Timings ¶ added in v21.11.1
type Timings interface { // OperationTimeout ... OperationTimeout() time.Duration // HostOperationTimeout ... HostOperationTimeout() time.Duration // HostLongOperationTimeout ... HostLongOperationTimeout() time.Duration // HostCreationTimeout ... HostCreationTimeout() time.Duration // HostCleanupTimeout ... HostCleanupTimeout() time.Duration // CommunicationTimeout ... CommunicationTimeout() time.Duration // ConnectionTimeout ... ConnectionTimeout() time.Duration // ContextTimeout ... ContextTimeout() time.Duration // ExecutionTimeout ... ExecutionTimeout() time.Duration // SSHConnectionTimeout ... SSHConnectionTimeout() time.Duration // MetadataTimeout ... MetadataTimeout() time.Duration // MetadataReadAfterWriteTimeout ... MetadataReadAfterWriteTimeout() time.Duration // SmallDelay ... SmallDelay() time.Duration // NormalDelay returns the currently configure normal delay stored in Timings NormalDelay() time.Duration // BigDelay returns the currently configured big delay stored in Timings BigDelay() time.Duration }