Documentation ¶
Index ¶
- Constants
- func GenerateObservation(az redis.ResourceType) v1beta1.RedisObservation
- func LateInitialize(spec *v1beta1.RedisParameters, az redis.ResourceType)
- func NeedsUpdate(spec v1beta1.RedisParameters, az redis.ResourceType) bool
- func NewCreateParameters(cr *v1beta1.Redis) redis.CreateParameters
- func NewSKU(s v1beta1.SKU) *redis.Sku
- func NewUpdateParameters(spec v1beta1.RedisParameters, state redis.ResourceType) redis.UpdateParameters
Constants ¶
const ( ProvisioningStateCreating = string(redis.Creating) ProvisioningStateDeleting = string(redis.Deleting) ProvisioningStateFailed = string(redis.Failed) ProvisioningStateSucceeded = string(redis.Succeeded) )
Resource states
Variables ¶
This section is empty.
Functions ¶
func GenerateObservation ¶
func GenerateObservation(az redis.ResourceType) v1beta1.RedisObservation
GenerateObservation produces a RedisObservation object from the redis.ResourceType received from Azure.
func LateInitialize ¶
func LateInitialize(spec *v1beta1.RedisParameters, az redis.ResourceType)
LateInitialize fills the spec values that user did not fill with their corresponding value in the Azure, if there is any.
func NeedsUpdate ¶
func NeedsUpdate(spec v1beta1.RedisParameters, az redis.ResourceType) bool
NeedsUpdate returns true if the supplied spec object differs from the supplied Azure resource. It considers only fields that can be modified in place without deleting and recreating the instance.
func NewCreateParameters ¶
func NewCreateParameters(cr *v1beta1.Redis) redis.CreateParameters
NewCreateParameters returns Redis resource creation parameters suitable for use with the Azure API.
func NewUpdateParameters ¶
func NewUpdateParameters(spec v1beta1.RedisParameters, state redis.ResourceType) redis.UpdateParameters
NewUpdateParameters returns a redis.UpdateParameters object only with changed fields. TODO(muvaf): Removal of an entry from the maps such as RedisConfiguration and TenantSettings is not properly supported. The user has to give empty string for deletion instead of just deleting the whole entry. NOTE(muvaf): This is barely a comparison function with almost identical if statements which increase the cyclomatic complexity even though it's actually easier to maintain all this in one function. nolint:gocyclo
Types ¶
This section is empty.