elasticache

package
v0.0.0-...-731f75f Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*memcache.Client
	// contains filtered or unexported fields
}

Client embeds the memcache client so we can hide those details away

func New

func New() (*Client, error)

New returns an instance of the memcache client

func NewInstance

func NewInstance(endpointEnvVarName string) (*Client, error)

NewInstance - returns an instance of the memcache client, this alternative constructor

allows an endpoint environment variable to be specified specific to this
instance. Where a value is not provided the default value: ELASTICACHE_ENDPOINT
will be used.

func (*Client) ListAllKeys

func (c *Client) ListAllKeys() (*[]string, error)

Lists all keys stored accross all nodes in the Cluster.

func (*Client) Set

func (c *Client) Set(item *Item) error

Set abstracts the memcache client details away, by copying over the values provided by the user into the Set method, as coercing the custom Item type to the required memcache.Item type isn't possible. Downside is if memcache client fields ever change, it'll introduce a break

type Item

type Item memcache.Item

Item embeds the memcache client's type of the same name

type Node

type Node struct {
	URL  string
	Host string
	IP   string
	Port int
}

Node is a single ElastiCache node

Jump to

Keyboard shortcuts

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