ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - aliexpressru/gomemcached: A Binary Memcached client for Go with support for sharding using consistent hashing, along with SASL.
A Binary Memcached client for Go with support for sharding using consistent hashing, along with SASL. - aliexpressru/gomemcached
Visit Site

GitHub - aliexpressru/gomemcached: A Binary Memcached client for Go with support for sharding using consistent hashing, along with SASL.

GitHub - aliexpressru/gomemcached: A Binary Memcached client for Go with support for sharding using consistent hashing, along with SASL.

Gomemcached


License Tag Godoc

Gomemcached Coverage

Mentioned in Awesome Go


Gomemcached is a Golang Memcached client designed to interact with multiple instances as shards. Implements sharding using a Consistent Hash.


Configuration

    - name: MEMCACHED_HEADLESS_SERVICE_ADDRESS
      value: "my-memchached-service-headless.namespace.svc.cluster.local"

MEMCACHED_HEADLESS_SERVICE_ADDRESS groups all memcached instances by ip addresses using dns lookup.

Default Memcached port is 11211, but you can also specify it in config.

    - name: MEMCACHED_PORT
      value: "12345"

For local run or if you have a static amount and setup of pods you can specify Servers (list separated by commas along with the port) manually instead of setting the HeadlessServiceAddress:

  - name: MEMCACHED_SERVERS
    value: "127.0.0.1:11211,192.168.0.1:1234"

Usage

Initialization client and connected to memcached servers.

    mcl, err := memcached.InitFromEnv()
    mustInit(err)
    a.AddCloser(func () error {
        mcl.CloseAllConns()
        return nil
    })

More examples

To use SASL specify option for InitFromEnv:

    memcached.InitFromEnv(memcached.WithAuthentication("<login>", "<password>"))

Can use Options with InitFromEnv to customize the client to suit your needs. However, for basic use, it is recommended to use the default client implementation.


Recommended Versions

This project is developed and tested with the following recommended versions:


Dependencies

This project utilizes the following third-party libraries, each governed by the MIT License:

  1. gomemcache

    • Description: A Go client library for the memcached server.
    • Used for: Primary client methods for interacting with the library.
    • License: Apache License 2.0
  2. go-zero

    • Description: A cloud-native Go microservices framework with cli tool for productivity.
    • Used for: Implementation of Consistent Hash.
    • License: MIT License
  3. gomemcached

    • Description: A memcached binary protocol toolkit for go.
    • Used for: Implementation of a binary client for Memcached.
    • License: MIT License

Please review the respective license files in the linked repositories for more details.

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory