common

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Common retry durations
	DURATION_1M  = 1 * time.Minute
	DURATION_5M  = 5 * time.Minute
	DURATION_10M = 10 * time.Minute
	DURATION_20M = 20 * time.Minute
	DURATION_30M = 30 * time.Minute
	DURATION_40M = 40 * time.Minute
	DURATION_1H  = 1 * time.Hour
	DURATION_2H  = 2 * time.Hour

	// Common client errors
	ERR_CLIENT_TIMEOUT = "Client.Timeout exceeded"
	ERR_NO_SUCH_HOST   = "dial tcp: lookup"

	// Acceptance tests constants
	ACC_TEST_PROJECT_ID = "2d07c991-6cd4-475e-b00b-8acc2494f73f"
)

Variables

This section is empty.

Functions

func IsNonRetryable

func IsNonRetryable(err error) bool

IsNonRetryable is a helper function to determine if an error returned from the client is expected (the operation can try to run again) or an unexpected error that should end further retries

func ShouldAccTestRun added in v0.2.0

func ShouldAccTestRun(runFlag bool) bool

ShouldAccTestRun returns true of the provided flag is true or if an env variable ACC_TEST_CI has any value

func ToString

func ToString(ctx context.Context, v attr.Value) (string, error)

ToString converts attr.Value to string

Types

type Provider

type Provider interface {
	provider.Provider
	// Returns true when the provider has been configured
	IsConfigured() bool

	// Client - returns the STACKIT client
	Client() *client.Client

	// ServiceAccountID - returns the service account id
	ServiceAccountID() string
}

Jump to

Keyboard shortcuts

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