Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultReadTime indicates default connect timeout number DefaultReadTime = 60 * time.Second // PubilConnectionDomain indicates instances connect domain PubilConnectionDomain = "-pb.redis.rds.aliyuncs.com" // HTTPSScheme indicates request scheme HTTPSScheme = "https" // VPCNetworkType indicates network type by vpc VPCNetworkType = "VPC" )
Variables ¶
View Source
var ( // ErrDBInstanceNotFound indicates DBInstance not found ErrDBInstanceNotFound = errors.New("DBInstanceNotFound") )
Functions ¶
func GenerateObservation ¶
func GenerateObservation(db *DBInstance) v1alpha1.RedisInstanceObservation
GenerateObservation is used to produce v1alpha1.RedisInstanceObservation from redis.DBInstance.
func IsErrorNotFound ¶
IsErrorNotFound helper function to test for ErrCodeDBInstanceNotFoundFault error
Types ¶
type Client ¶
type Client interface { DescribeDBInstance(id string) (*DBInstance, error) CreateAccount(id, username, password string) error CreateDBInstance(*CreateRedisInstanceRequest) (*DBInstance, error) DeleteDBInstance(id string) error AllocateInstancePublicConnection(id string, port int) (string, error) ModifyDBInstanceConnectionString(id string, port int) (string, error) Update(id string, req *ModifyRedisInstanceRequest) error }
Client defines Redis client operations
type CreateRedisInstanceRequest ¶
type CreateRedisInstanceRequest struct { Name string InstanceType string EngineVersion string SecurityIPList string InstanceClass string Password string ChargeType string Port int NetworkType string VpcID string VSwitchID string }
CreateRedisInstanceRequest defines the request info to create DB Instance
func MakeCreateDBInstanceRequest ¶
func MakeCreateDBInstanceRequest(name string, p *v1alpha1.RedisInstanceParameters) *CreateRedisInstanceRequest
MakeCreateDBInstanceRequest generates CreateDBInstanceRequest
type DBInstance ¶
type DBInstance struct { // Instance ID ID string // Instance status Status string // Endpoint specifies the connection endpoint. Endpoint *v1alpha1.Endpoint }
DBInstance defines the DB instance information
type ModifyRedisInstanceRequest ¶
type ModifyRedisInstanceRequest struct {
InstanceClass string
}
ModifyRedisInstanceRequest defines the request info to modify DB Instance
Click to show internal directories.
Click to hide internal directories.