tf

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccRandTimeInt

func AccRandTimeInt() int

func ErrorDiagF

func ErrorDiagF(err error, format string, a ...interface{}) diag.Diagnostics

func ErrorDiagPathF

func ErrorDiagPathF(err error, attr string, summary string, a ...interface{}) diag.Diagnostics

func LockByName

func LockByName(resourceType string, name string)

handles the case of using the same name for different kinds of resources

func Set

func Set(d *schema.ResourceData, attr string, value interface{}) diag.Diagnostics

func UnlockByName

func UnlockByName(resourceType string, name string)

func ValidateResourceIDPriorToImport

func ValidateResourceIDPriorToImport(idParser ResourceIDValidator) *schema.ResourceImporter

ValidateResourceIDPriorToImport parses the Resource ID to confirm it's valid for this Resource prior to performing an import - allowing for incorrect Resource ID's to be caught prior to Import and subsequent crashes

func ValidateResourceIDPriorToImportThen

func ValidateResourceIDPriorToImportThen(idParser ResourceIDValidator, importer schema.StateContextFunc) *schema.ResourceImporter

ValidateResourceIDPriorToImportThen parses the Resource ID to confirm it's valid for this Resource prior to calling the importer - allowing for incorrect Resource ID's to be caught prior to Import and subsequent crashes

Types

type MutexKV

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

MutexKV is a simple key/value store for arbitrary mutexes. It can be used to serialise changes across arbitrary collaborators that share knowledge of the keys they must serialise on.

func NewMutexKV

func NewMutexKV() *MutexKV

Returns a properly initialised MutexKV

func (*MutexKV) Lock

func (m *MutexKV) Lock(key string)

Locks the mutex for the given key. Caller is responsible for calling Unlock for the same key

func (*MutexKV) Unlock

func (m *MutexKV) Unlock(key string)

Unlock the mutex for the given key. Caller must have called Lock for the same key first

type ResourceIDValidator

type ResourceIDValidator func(resourceId string) error

ResourceIDValidator takes a Resource ID and confirms that it's Valid

Jump to

Keyboard shortcuts

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