Documentation
¶
Overview ¶
Package resource provides a way to interact with resources. This provides multiple interfaces to test against as resources can optionally implement these interfaces.
All new resources should implement Properties() and UniqueKey(), but not String(). Without UniqueKey(), libnuke attempts to use Properties() to match resources, which does not work if any of the properties change in value during the run. UniqueKey() is also useful in older resources that still implement String(), to prevent libnuke from mistakenly identifying resources that were recreated with the same String() value after being nuked.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleWaitHook ¶ added in v0.15.0
HandleWaitHook is an interface that allows a resource to handle waiting for a resource to be deleted. This is useful for resources that may take a while to delete, typically where the delete operation happens asynchronously from the initial delete command. This allows libnuke to not block during the delete operation.
type LegacyStringer ¶
type PropertyGetter ¶
type PropertyGetter interface {
Resource
Properties() types.Properties
}
type QueueItemHook ¶ added in v0.16.0
type QueueItemHook interface {
Resource
BeforeEnqueue(interface{})
}
QueueItemHook is an interface that allows a resource to modify the queue item to which it belongs to. For advanced use only, please use with caution!
type SettingsGetter ¶
type UniqueKeyGetter ¶ added in v1.1.0
UniqueKeyGetter is an interface that allows a resource to provide a key that uniquely identifies an instance of a resource. UniqueKey() can return any field that uniquely identifies the resource and whose value is random or non- deterministic. For example, an EC2 instance ID (i-1234567890abcdef0), or resource name with creation time appended.