elasticache

package
v0.0.0-...-2731d20 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheClusterNotFound = errors.New("Cache cluster not found")
)

Functions

This section is empty.

Types

type CacheCluster

type CacheCluster struct {
	CacheClusterId string       `xml:"CacheCluster>CacheClusterId"`
	CacheNodes     []*CacheNode `xml:"CacheCluster>CacheNodes"`
}

CacheCluster represents a cache cluster

type CacheNode

type CacheNode struct {
	Endpoint *Endpoint `xml:"CacheNode>Endpoint"`
}

CacheNode represents a cache node

type DescribeCacheClustersResult

type DescribeCacheClustersResult struct {
	CacheClusters []*CacheCluster `xml:"DescribeCacheClustersResult>CacheClusters"`
}

DescribeCacheClustersResult represents the response from a DescribeCacheClusters ElastiCache API call

type DescribeReplicationGroupsResult

type DescribeReplicationGroupsResult struct {
	ReplicationGroups []ReplicationGroup `xml:"DescribeReplicationGroupsResult>ReplicationGroups"`
}

DescribeReplicationGroupsResult represents the response

type ElastiCache

type ElastiCache struct {
	aws.Auth
	aws.Region
}

func New

func New(auth aws.Auth, region aws.Region) *ElastiCache

New creates a new ElastiCache instance

func (*ElastiCache) DescribeCacheCluster

func (ec *ElastiCache) DescribeCacheCluster(cluster string) (*CacheCluster, error)

DescribeCacheCluster returns information about a cache cluster

func (*ElastiCache) DescribeReplicationGroup

func (ec *ElastiCache) DescribeReplicationGroup(groupName string) (*ReplicationGroup, error)

DescribeReplicationGroup returns information about a cache replication group

type Endpoint

type Endpoint struct {
	Host string `xml:"Address"`
	Port int    `xml:"Port"`
}

Endpoint represents a cache node endpoint

type Error

type Error struct {
	// HTTP status code
	StatusCode int
	// AWS error code
	Code string
	// The human-oriented error message
	Message string
}

Error encapsulates an error returned by EC.

func (*Error) Error

func (err *Error) Error() string

type NodeGroup

type NodeGroup struct {
	Status           string             `xml:"NodeGroup>Status"`
	PrimaryEndpoint  PrimaryEndpoint    `xml:"NodeGroup>PrimaryEndpoint"`
	NodeGroupMembers []*NodeGroupMember `xml:"NodeGroup>NodeGroupMembers>NodeGroupMember"`
}

NodeGroup represents a node group

type NodeGroupMember

type NodeGroupMember struct {
	CurrentRole               string       `xml:"CurrentRole"`
	PreferredAvailabilityZone string       `xml:"PreferredAvailabilityZone"`
	CacheNodeId               string       `xml:"CacheNodeId"`
	CacheClusterId            string       `xml:"CacheClusterId"`
	ReadEndpoint              ReadEndpoint `xml:"ReadEndpoint"`
}

NodeGroupMember represents an individual node

type PrimaryEndpoint

type PrimaryEndpoint struct {
	Port    int    `xml:"Port"`
	Address string `xml:"Address"`
}

PrimaryEndpoint represents the primary endpoint

type ReadEndpoint

type ReadEndpoint struct {
	Port    int    `xml:"Port"`
	Address string `xml:"Address"`
}

ReadEndpoint represents a read endpoint

type ReplicationGroup

type ReplicationGroup struct {
	Status             string      `xml:"ReplicationGroup>Status"`
	ReplicationGroupId string      `xml:"ReplicationGroup>ReplicationGroupId"`
	MemberClusters     []string    `xml:"ReplicationGroup>MemberClusters>ClusterId"`
	NodeGroups         []NodeGroup `xml:"ReplicationGroup>NodeGroups"`
}

ReplicationGroup represents a replication group

func (*ReplicationGroup) GetPrimaryNode

func (repGroup *ReplicationGroup) GetPrimaryNode() (*PrimaryEndpoint, error)

Jump to

Keyboard shortcuts

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