providers

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Host       string `json:"host"`
	Port       int64  `json:"port"`
	Name       string `json:"name"`
	Password   string `json:"password"`
	URI        string `json:"uri"`
	TLSEnabled bool   `json:"tls_enabled"`
}

Credentials are the connection parameters for Redis clients

type DeprovisionParameters

type DeprovisionParameters struct {
	FinalSnapshotIdentifier string
}

type ElastiCache

type ElastiCache interface {
	CreateCacheParameterGroupWithContext(ctx aws.Context, input *elasticache.CreateCacheParameterGroupInput, opts ...request.Option) (*elasticache.CreateCacheParameterGroupOutput, error)
	CreateReplicationGroupWithContext(ctx aws.Context, input *elasticache.CreateReplicationGroupInput, opts ...request.Option) (*elasticache.CreateReplicationGroupOutput, error)
	DeleteCacheParameterGroupWithContext(ctx aws.Context, input *elasticache.DeleteCacheParameterGroupInput, opts ...request.Option) (*elasticache.DeleteCacheParameterGroupOutput, error)
	DeleteReplicationGroupWithContext(ctx aws.Context, input *elasticache.DeleteReplicationGroupInput, opts ...request.Option) (*elasticache.DeleteReplicationGroupOutput, error)
	DescribeReplicationGroupsWithContext(ctx aws.Context, input *elasticache.DescribeReplicationGroupsInput, opts ...request.Option) (*elasticache.DescribeReplicationGroupsOutput, error)
	ModifyCacheParameterGroupWithContext(ctx aws.Context, input *elasticache.ModifyCacheParameterGroupInput, opts ...request.Option) (*elasticache.CacheParameterGroupNameMessage, error)
	DescribeSnapshotsPagesWithContext(ctx aws.Context, input *elasticache.DescribeSnapshotsInput, fn func(*elasticache.DescribeSnapshotsOutput, bool) bool, opts ...request.Option) error
	ListTagsForResourceWithContext(ctx aws.Context, input *elasticache.ListTagsForResourceInput, opts ...request.Option) (*elasticache.TagListMessage, error)
}

ElastiCache is a partially extracted interface from the AWS Elasticache SDK

type Provider

type Provider interface {
	Provision(ctx context.Context, instanceID string, params ProvisionParameters) error
	Deprovision(ctx context.Context, instanceID string, params DeprovisionParameters) error
	GetState(ctx context.Context, instanceID string) (ServiceState, string, error)
	GenerateCredentials(ctx context.Context, instanceID, bindingID string) (*Credentials, error)
	RevokeCredentials(ctx context.Context, instanceID, bindingID string) error
	DeleteCacheParameterGroup(ctx context.Context, instanceID string) error
	FindSnapshots(ctx context.Context, instanceID string) ([]SnapshotInfo, error)
}

Provider is a general interface to implement the broker's functionality with a specific provider

type ProvisionParameters

type ProvisionParameters struct {
	InstanceType               string
	CacheParameterGroupName    string
	SecurityGroupIds           []string
	CacheSubnetGroupName       string
	PreferredMaintenanceWindow string
	ReplicasPerNodeGroup       int64
	ShardCount                 int64
	SnapshotRetentionLimit     int64
	RestoreFromSnapshot        *string
	Description                string
	Parameters                 map[string]string
	Tags                       map[string]string
}

type ServiceState

type ServiceState string

ServiceState is the state of a service instance

const (
	Creating     ServiceState = "creating"
	Available    ServiceState = "available"
	Modifying    ServiceState = "modifying"
	Deleting     ServiceState = "deleting"
	CreateFailed ServiceState = "create-failed"
	Snapshotting ServiceState = "snapshotting"
	NonExisting  ServiceState = "non-existing"
)

Service states

type SnapshotInfo

type SnapshotInfo struct {
	Name       string
	CreateTime time.Time
	Tags       map[string]string
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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