Files
storage/etcd
dependabot[bot] 5142f45102 chore(deps): bump the grpc-gateway-modules group across 17 directories with 1 update
Bumps the grpc-gateway-modules group with 1 update in the /aerospike directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /arangodb directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /cassandra directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /clickhouse directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /couchbase directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /dynamodb directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /etcd directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /minio directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /mongodb directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /mysql directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /nats directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /neo4j directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /postgres directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /s3 directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /scylladb directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /surrealdb directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).
Bumps the grpc-gateway-modules group with 1 update in the /testhelpers/redis directory: [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway).


Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.25.1 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.16.0 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

Updates `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.26.3 to 2.27.3
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.25.1...v2.27.3)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.3
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: grpc-gateway-modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 21:06:47 +00:00
..
2023-07-03 23:59:48 +03:00
2025-07-06 16:07:06 +03:00

id, title
id title
etcd Etcd

Release Discord Test

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) SetWithContext(ctx context.Context, key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) DeleteWithContext(ctx context.Context, key string) error
func (s *Storage) Reset() error
func (s *Storage) ResetWithContext(ctx context.Context) error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
    Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
    // Endpoints is a list of URLs.
    Endpoints   []string
    // DialTimeout is the timeout for failing to establish a connection.
    DialTimeout time.Duration
    // Username is a username for authentication.
    Username    string
    // Password is a password for authentication.
    Password    string
	// TLS holds the client secure credentials, if any.
	TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
    Endpoints:   []string{"localhost:2379"},
    DialTimeout: 2 * time.Second,
    Username:    "",
    Password:    "",
    TLS:         nil,
}