util

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package util include a serie of utilities for Terracognita

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashicorpToZclonfType added in v0.7.0

func HashicorpToZclonfType(ht hcty.Type) (zcty.Type, error)

HashicorpToZclonfType converts from Hashicoprt.Type to zclconf.Type

func HashicorpToZclonfValue added in v0.7.0

func HashicorpToZclonfValue(hv hcty.Value, ht hcty.Type) (zcty.Value, error)

HashicorpToZclonfValue converts from Hashicoprt.Value to zclconf.Value

func NormalizeName added in v0.7.3

func NormalizeName(n string) string

NormalizeName will convert the n into an low case alphanumeric value and the invalid characters will be replaced by '_'

func Retry

func Retry(rfn RetryFn, times int, interval time.Duration) error

Retry calls rfn and checks the errors, if it matches the error and if it does it tries 'times' withing the 'interval'

func RetryDefault

func RetryDefault(rfn RetryFn) error

RetryDefault calls Retry with the default parameters

Types

type RetryFn

type RetryFn func() error

RetryFn it's a type to represent the function wrapped for the Retry or RetryDefault methods

Jump to

Keyboard shortcuts

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