redis

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const PasswordLength = 32

Variables

This section is empty.

Functions

func GenerateAuthToken

func GenerateAuthToken() string

GenerateAuthToken generates an alphanumeric cryptographically-secure password

func GenerateReplicationGroupName

func GenerateReplicationGroupName(instanceID string) string

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 GetPrimaryAndReplicaCacheClusterIds added in v0.29.0

func GetPrimaryAndReplicaCacheClusterIds(replicationGroup *elasticache.ReplicationGroup) (primary string, replica string, err error)

func RandomAlphaNum added in v0.11.0

func RandomAlphaNum(length int) string

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 (p *RedisProvider) CreateAuthTokenSecret(ctx context.Context, instanceID string, authToken string) error

func (*RedisProvider) DeleteAuthTokenSecret added in v0.11.0

func (p *RedisProvider) DeleteAuthTokenSecret(ctx context.Context, instanceID string, recoveryWindowInDays int) error

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 (p *RedisProvider) GetInstanceTags(ctx context.Context, instanceID string) (map[string]string, error)

func (*RedisProvider) ProgressState added in v0.29.0

func (p *RedisProvider) ProgressState(
	ctx context.Context,
	instanceID string,
	operation string,
	oldPrimaryNode string,
) (providers.ServiceState, string, error)

ProgressState returns with the state of an existing cluster and progresses any change in progress 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) StartFailoverTest added in v0.29.0

func (p *RedisProvider) StartFailoverTest(ctx context.Context, instanceID string) (string, error)

func (*RedisProvider) UpdateParamGroupParameters added in v0.28.0

func (p *RedisProvider) UpdateParamGroupParameters(ctx context.Context, instanceID string, params providers.UpdateParamGroupParameters) error

func (*RedisProvider) UpdateReplicationGroup added in v0.28.0

func (p *RedisProvider) UpdateReplicationGroup(ctx context.Context, instanceID string, params providers.UpdateReplicationGroupParameters) error

Jump to

Keyboard shortcuts

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