Documentation ¶
Index ¶
- Constants
- func GenerateAuthToken() string
- func GenerateReplicationGroupName(instanceID string) string
- func RandomAlphaNum(length int) string
- type RedisProvider
- func (p *RedisProvider) CreateAuthTokenSecret(ctx context.Context, instanceID string, authToken string) error
- func (p *RedisProvider) DeleteAuthTokenSecret(ctx context.Context, instanceID string, recoveryWindowInDays int) error
- func (p *RedisProvider) DeleteCacheParameterGroup(ctx context.Context, instanceID string) error
- func (p *RedisProvider) Deprovision(ctx context.Context, instanceID string, params providers.DeprovisionParameters) error
- func (p *RedisProvider) FindSnapshots(ctx context.Context, instanceID string) ([]providers.SnapshotInfo, error)
- func (p *RedisProvider) GenerateCredentials(ctx context.Context, instanceID, bindingID string) (*providers.Credentials, error)
- func (p *RedisProvider) GetInstanceParameters(ctx context.Context, instanceID string) (providers.InstanceParameters, error)
- func (p *RedisProvider) GetInstanceTags(ctx context.Context, instanceID string) (map[string]string, error)
- func (p *RedisProvider) GetState(ctx context.Context, instanceID string) (providers.ServiceState, string, error)
- func (p *RedisProvider) Provision(ctx context.Context, instanceID string, params providers.ProvisionParameters) error
- func (p *RedisProvider) RevokeCredentials(ctx context.Context, instanceID, bindingID string) error
- func (p *RedisProvider) Update(ctx context.Context, instanceID string, params providers.UpdateParameters) error
Constants ¶
const PasswordLength = 32
Variables ¶
This section is empty.
Functions ¶
func GenerateAuthToken ¶
func GenerateAuthToken() string
GenerateAuthToken generates an alphanumeric cryptographically-secure password
func GenerateReplicationGroupName ¶
GenerateReplicationGroupName generates a valid ElastiCache replication group name A valid name must contain between 1 and 20 alphanumeric characters or hyphens, should start with a letter, and cannot end with a hyphen or contain two consecutive hyphens.
func RandomAlphaNum ¶ added in v0.11.0
Types ¶
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
RedisProvider is the Redis broker provider
func NewProvider ¶
func NewProvider( elastiCache providers.ElastiCache, secretsManager providers.SecretsManager, awsAccountID, awsPartition, awsRegion string, logger lager.Logger, kmsKeyID string, secretsManagerPath string, ) *RedisProvider
NewProvider creates a new Redis provider
func (*RedisProvider) CreateAuthTokenSecret ¶ added in v0.11.0
func (*RedisProvider) DeleteAuthTokenSecret ¶ added in v0.11.0
func (*RedisProvider) DeleteCacheParameterGroup ¶
func (p *RedisProvider) DeleteCacheParameterGroup(ctx context.Context, instanceID string) error
func (*RedisProvider) Deprovision ¶
func (p *RedisProvider) Deprovision(ctx context.Context, instanceID string, params providers.DeprovisionParameters) error
Deprovision deletes the replication group
func (*RedisProvider) FindSnapshots ¶
func (p *RedisProvider) FindSnapshots(ctx context.Context, instanceID string) ([]providers.SnapshotInfo, error)
FindSnapshots returns the list of snapshots found for a given instance ID
func (*RedisProvider) GenerateCredentials ¶
func (p *RedisProvider) GenerateCredentials(ctx context.Context, instanceID, bindingID string) (*providers.Credentials, error)
GenerateCredentials generates the client credentials for a Redis instance and an app
func (*RedisProvider) GetInstanceParameters ¶ added in v0.27.0
func (p *RedisProvider) GetInstanceParameters(ctx context.Context, instanceID string) (providers.InstanceParameters, error)
func (*RedisProvider) GetInstanceTags ¶ added in v0.27.0
func (*RedisProvider) GetState ¶
func (p *RedisProvider) GetState(ctx context.Context, instanceID string) (providers.ServiceState, string, error)
GetState returns with the state of an existing cluster If the cluster doesn't exist we return with the providers.NonExisting state
func (*RedisProvider) Provision ¶
func (p *RedisProvider) Provision(ctx context.Context, instanceID string, params providers.ProvisionParameters) error
Provision creates a replication group and a cache parameter group
func (*RedisProvider) RevokeCredentials ¶
func (p *RedisProvider) RevokeCredentials(ctx context.Context, instanceID, bindingID string) error
RevokeCredentials revokes the credentials between an app and a Redis instance
The method does nothing because we can't revoke the credentials as there is one common password for a Redis service instance
func (*RedisProvider) Update ¶ added in v0.9.0
func (p *RedisProvider) Update(ctx context.Context, instanceID string, params providers.UpdateParameters) error