redis

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 14 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 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) 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

Jump to

Keyboard shortcuts

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