All Projects → Integralist → go-elasticache

Integralist / go-elasticache

Licence: MIT license
Thin abstraction over the Memcache client package gomemcache (https://github.com/bradfitz/gomemcache) allowing it to support AWS ElastiCache cluster nodes

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go-elasticache

memcached
Memcached Operator for Kubernetes
Stars: ✭ 18 (+20%)
Mutual labels:  memcached, memcache
Xmemcached
High performance, easy to use multithreaded memcached client in java.
Stars: ✭ 715 (+4666.67%)
Mutual labels:  memcached, memcache
mdserver-web
Simple Linux Panel
Stars: ✭ 1,064 (+6993.33%)
Mutual labels:  memcached, memcache
memcache
Node.js memcached client with the most efficient ASCII protocol parser
Stars: ✭ 26 (+73.33%)
Mutual labels:  memcached, memcache
Memjs
A memcache client for node using the binary protocol and SASL authentication
Stars: ✭ 161 (+973.33%)
Mutual labels:  memcached, memcache
Memcache Info
Simple and efficient way to show information about Memcache.
Stars: ✭ 84 (+460%)
Mutual labels:  memcached, memcache
Pymemcache
A comprehensive, fast, pure-Python memcached client.
Stars: ✭ 552 (+3580%)
Mutual labels:  memcached, memcache
serverless-examples-cached-rds-ws
A serverless framework example project that uses API Gateway, ElastiCache, and RDS PostgreSQL.
Stars: ✭ 45 (+200%)
Mutual labels:  memcached, elasticache
Wp Spider Cache
Your friendly neighborhood caching solution for WordPress
Stars: ✭ 133 (+786.67%)
Mutual labels:  memcached, memcache
Overlord
Overlord是哔哩哔哩基于Go语言编写的memcache和redis&cluster的代理及集群管理功能,致力于提供自动化高可用的缓存服务解决方案。
Stars: ✭ 1,884 (+12460%)
Mutual labels:  memcached, memcache
Ninja Mutex
Mutex implementation for PHP
Stars: ✭ 180 (+1100%)
Mutual labels:  memcached, memcache
rust-memcache
memcache client for rust
Stars: ✭ 106 (+606.67%)
Mutual labels:  memcached, memcache
aiomcache
Minimal asyncio memcached client
Stars: ✭ 129 (+760%)
Mutual labels:  memcached
cache-all
Fast, efficient cache engines for both express routes & native nodeJs (redis, in-memory & file cache)
Stars: ✭ 22 (+46.67%)
Mutual labels:  memcached
libmemcached
Resurrection of libmemcached
Stars: ✭ 30 (+100%)
Mutual labels:  memcached
sparql-proxy
SPARQL-proxy: provides cache, job control, and logging for any SPARQL endpoint
Stars: ✭ 26 (+73.33%)
Mutual labels:  memcached
terraform-aws-redis-elasticache
A Terraform module to create an Amazon Web Services (AWS) Redis ElastiCache cluster.
Stars: ✭ 33 (+120%)
Mutual labels:  elasticache
Cachalot
Caching rethought – cache a lot in a proper way.
Stars: ✭ 25 (+66.67%)
Mutual labels:  memcache
docker-lemp
A single container LEMP complete fullstack with latest release of PHP7.4.33, 8.0.26 & 8.1.13/8.2RC and MySQL, nginx, PostgreSQL, phalcon, swoole, mailcatcher, beanstalkd, elasticsearch, memcached, redis, adminer and all you ever need; on top alpine3.15
Stars: ✭ 106 (+606.67%)
Mutual labels:  memcached
memcached-spring-boot
Library that provides support for auto-configuration of Memcached cache in a Spring Boot application.
Stars: ✭ 68 (+353.33%)
Mutual labels:  memcached

go-elasticache

Thin abstraction over the Memcache client package gomemcache
allowing it to support AWS ElastiCache cluster nodes

Explanation

When using the memcache client gomemcache you typically call a constructor and pass it a list of memcache nodes like so:

mc := memcache.New("10.0.0.1:11211", "10.0.0.2:11211", "10.0.0.3:11212")

But when using the AWS ElastiCache service you need to query a particular internal endpoint via a socket connection and manually parse out the details of the available cluster.

In Ruby it seems most Memcache clients are setup to handle this for you, but in Go that doesn't appear to be the case. Hence I've created this package as a thin abstraction layer on top of the gomemcache package.

Example

Below is an example of how to use this package.

To run it locally you will need the following dependencies installed and running:

  • Memcache (e.g. docker run -d -p 11211:11211 memcached)
  • fake_elasticache (e.g. gem install fake_elasticache && fake_elasticache)
package main

import (
	"fmt"
	"log"

	"github.com/integralist/go-elasticache/elasticache"
)

func main() {
	mc, err := elasticache.New()
	if err != nil {
		log.Fatalf("Error: %s", err.Error())
	}

	if err := mc.Set(&elasticache.Item{Key: "foo", Value: []byte("my value")}); err != nil {
		log.Println(err.Error())
	}

	it, err := mc.Get("foo")
	if err != nil {
		log.Println(err.Error())
		return
	}

	fmt.Printf("%+v", it) 
  // &{Key:foo Value:[109 121 32 118 97 108 117 101] Flags:0 Expiration:0 casid:9}
}

Note: when running in production make sure to set the environment variable ELASTICACHE_ENDPOINT

Licence

The MIT License (MIT)

Copyright (c) 2016 Mark McDonnell

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].