Documentation ¶
Index ¶
- Constants
- Variables
- func ProviderStatesMapping(state providers.ServiceState) (brokerapi.LastOperationState, error)
- type BindParameters
- type Broker
- func (b *Broker) Bind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (b *Broker) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, ...) (brokerapi.DeprovisionServiceSpec, error)
- func (b *Broker) GetBinding(ctx context.Context, first, second string) (brokerapi.GetBindingSpec, error)
- func (b *Broker) GetInstance(ctx context.Context, instanceID string) (brokerapi.GetInstanceDetailsSpec, error)
- func (b *Broker) LastBindingOperation(ctx context.Context, first, second string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
- func (b *Broker) LastOperation(ctx context.Context, instanceID string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
- func (b *Broker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (b *Broker) Services(ctx context.Context) ([]brokerapi.Service, error)
- func (b *Broker) Unbind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.UnbindSpec, error)
- func (b *Broker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
- type ByCreateTime
- type Config
- type Operation
- type PlanConfig
- type ProvisionParameters
- type UpdateParameters
Constants ¶
const ( ActionProvisioning action = "provisioning" ActionDeprovisioning action = "deprovisioning" ActionUpdating action = "updating" ActionFailover action = "failover" FailoverTimeout = 45 * time.Minute )
Possible actions in the operation data
const ParamMaxMemoryPolicy = "maxmemory_policy"
const ParamPreferredMaintenanceWindow = "preferred_maintenance_window"
const ParamRestoreLatestSnapshotOf = "restore_from_latest_snapshot_of"
const TestFailover = "test_failover"
Variables ¶
var (
ErrNoSuchPlan = errors.New("no plan found")
)
Functions ¶
func ProviderStatesMapping ¶
func ProviderStatesMapping(state providers.ServiceState) (brokerapi.LastOperationState, error)
Types ¶
type BindParameters ¶
type BindParameters struct{}
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker is the open service broker API implementation for AWS Elasticache Redis
func (*Broker) Bind ¶
func (b *Broker) Bind(ctx context.Context, instanceID, bindingID string, details brokerapi.BindDetails, asyncAllowed bool) (brokerapi.Binding, error)
Bind binds an application and a service instance
func (*Broker) Deprovision ¶
func (b *Broker) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)
Deprovision deletes a service instance
func (*Broker) GetBinding ¶ added in v0.20.0
func (*Broker) GetInstance ¶ added in v0.20.0
func (*Broker) LastBindingOperation ¶ added in v0.20.0
func (b *Broker) LastBindingOperation(ctx context.Context, first, second string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
func (*Broker) LastOperation ¶
func (b *Broker) LastOperation(ctx context.Context, instanceID string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
LastOperation returns with the last known state of the given service instance
func (*Broker) Provision ¶
func (b *Broker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
Provision creates a new ElastiCache replication group
func (*Broker) Unbind ¶
func (b *Broker) Unbind(ctx context.Context, instanceID, bindingID string, details brokerapi.UnbindDetails, asyncAllowed bool) (brokerapi.UnbindSpec, error)
Unbind removes the binding between an application and a service instance
func (*Broker) Update ¶
func (b *Broker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)
Update modifies an existing service instance. It can be used to update the maintenance window and / or the maxmemory policy. As this is a synchronous operation, if updating the maintenance window fails the whole operation will fail (ie. it won't try to be smart and carry on)
type ByCreateTime ¶ added in v0.8.0
type ByCreateTime []providers.SnapshotInfo
Sort providers.SnapshotInfo
func (ByCreateTime) Len ¶ added in v0.8.0
func (ct ByCreateTime) Len() int
func (ByCreateTime) Less ¶ added in v0.8.0
func (ct ByCreateTime) Less(i, j int) bool
func (ByCreateTime) Swap ¶ added in v0.8.0
func (ct ByCreateTime) Swap(i, j int)
type Config ¶
type Config struct { LogLevel string `json:"log_level"` Username string `json:"username"` Password string `json:"password"` Region string `json:"region"` BrokerName string `json:"broker_name"` CacheSubnetGroupName string `json:"cache_subnet_group_name"` VpcSecurityGroupIds []string `json:"vpc_security_group_ids"` Catalog brokerapi.CatalogResponse `json:"catalog"` PlanConfigs map[string]PlanConfig `json:"plan_configs"` KmsKeyID string `json:"kms_key_id"` SecretsManagerPath string `json:"secrets_manager_path"` }
func LoadConfig ¶
func (Config) GetPlanConfig ¶
func (c Config) GetPlanConfig(planID string) (PlanConfig, error)
type Operation ¶ added in v0.4.0
type Operation struct { Action action `json:"action"` PrimaryNode string `json:"primaryNode"` TimeOut string `json:"timeOut"` }
Operation is the operation data passed back by the provision/deprovision/update calls and received by the last operation call
type PlanConfig ¶
type PlanConfig struct { InstanceType string `json:"instance_type"` ReplicasPerNodeGroup int64 `json:"replicas_per_node_group"` ShardCount int64 `json:"shard_count"` SnapshotRetentionLimit int64 `json:"snapshot_retention_limit"` AutomaticFailoverEnabled bool `json:"automatic_failover_enabled"` MultiAZEnabled bool `json:"multi_az_enabled"` Parameters map[string]string `json:"parameters"` Engine string `json:"engine"` EngineVersion string `json:"engine_version"` CacheParameterGroupFamily string `json:"cache_parameter_group_family"` }