elasticache

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package elasticache talks to ElastiCache (Redis and Valkey) over the signed Query API (version 2015-02-02). Reads are open; changes need the managed tag.

Index

Constants

View Source
const ServiceName = "elasticache"

ServiceName is the key used in the guard ServicesEnabled map.

Variables

View Source
var (
	ErrNotManaged   = errors.New("elasticache: resource is not managed by this control plane")
	ErrNeedsConfirm = errors.New("elasticache: delete needs the resource id typed as confirmation")
)

Errors the API layer maps to HTTP statuses.

View Source
var ManagedTag = tagPrefix + "managed"

ManagedTag marks resources this control plane owns.

View Source
var Service = awsx.Service{Name: "elasticache", Prefix: "elasticache", SigningName: "elasticache"}

Service is the ElastiCache Query API.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the lazy ElastiCache module; it makes no call until a method runs.

func New

func New(c *awsx.Client, g Guard) *Client

New wraps a shared client and guard.

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(ctx context.Context, region, groupID, name string, m Meta) error

CreateSnapshot snapshots a managed replication group and tags the snapshot as managed.

func (*Client) DeleteCluster

func (c *Client) DeleteCluster(ctx context.Context, in DeleteInput) error

DeleteCluster deletes a managed standalone cache cluster, with an optional final snapshot.

func (*Client) DeleteReplicationGroup

func (c *Client) DeleteReplicationGroup(ctx context.Context, in DeleteInput) error

DeleteReplicationGroup deletes a managed replication group, with an optional final snapshot.

func (*Client) DescribeCacheClusters

func (c *Client) DescribeCacheClusters(ctx context.Context, region string, id ...string) ([]Cluster, error)

DescribeCacheClusters lists cache clusters (all pages), or the one named.

func (*Client) DescribeReplicationGroups

func (c *Client) DescribeReplicationGroups(ctx context.Context, region string, id ...string) ([]ReplicationGroup, error)

DescribeReplicationGroups lists replication groups (all pages), or the one named. Ownership is read from tags with one extra call per group.

func (*Client) DescribeSnapshots

func (c *Client) DescribeSnapshots(ctx context.Context, region, groupID string) ([]Snapshot, error)

DescribeSnapshots lists snapshots (all pages), optionally for one replication group.

func (*Client) ListTags

func (c *Client) ListTags(ctx context.Context, region, arn string) (map[string]string, error)

ListTags reads the tags of a resource ARN.

func (*Client) RebootCluster

func (c *Client) RebootCluster(ctx context.Context, region, id string) error

RebootCluster reboots every node of a managed cache cluster.

type Cluster

type Cluster struct {
	ID, ARN, Engine, EngineVersion, Status, NodeType string
	Endpoint                                         string
	Port, Nodes                                      int
	GroupID                                          string
	NodeIDs                                          []string
	Managed                                          bool
}

Cluster is the read view of one cache cluster (a node or a standalone cluster).

type DeleteInput

type DeleteInput struct {
	Region, ID, Confirm, FinalSnapshotID string
}

DeleteInput is a delete request. Confirm must repeat the resource id.

type Guard

type Guard interface {
	Tags(m cloudguard.TagMeta) map[string]string
}

Guard supplies the mandatory tags.

type Meta

type Meta = cloudguard.TagMeta

Meta carries the values behind the mandatory tags.

type ReplicationGroup

type ReplicationGroup struct {
	ID, ARN, Description, Status, NodeType string
	PrimaryEndpoint, ReaderEndpoint        string
	Port                                   int
	MultiAZ, ClusterMode                   bool
	AtRestEncrypted, TransitEncrypted      bool
	Members                                []string
	Managed                                bool
}

ReplicationGroup is the read view of one replication group.

type Snapshot

type Snapshot struct {
	Name, ARN, GroupID, ClusterID, Engine, Status, Source string
	CreatedAt                                             time.Time
}

Snapshot is the read view of one snapshot.

Jump to

Keyboard shortcuts

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