1
0
mirror of https://github.com/alexedwards/scs.git synced 2025-07-17 01:12:21 +02:00

Fix typos

This commit is contained in:
gandaldf
2022-01-01 12:38:00 +01:00
parent 485a8f5fae
commit fc1ac1d3e3
3 changed files with 6 additions and 6 deletions

View File

@ -150,7 +150,7 @@ The session stores currently included are shown in the table below. Please click
| [badgerstore](https://github.com/alexedwards/scs/tree/master/badgerstore) | Badger based session store | | [badgerstore](https://github.com/alexedwards/scs/tree/master/badgerstore) | Badger based session store |
| [boltstore](https://github.com/alexedwards/scs/tree/master/boltstore) | Bolt based session store | | [boltstore](https://github.com/alexedwards/scs/tree/master/boltstore) | Bolt based session store |
| [buntdbstore](https://github.com/alexedwards/scs/tree/master/buntdbstore) | BuntDB based session store | | [buntdbstore](https://github.com/alexedwards/scs/tree/master/buntdbstore) | BuntDB based session store |
| [etcdstore](https://github.com/alexedwards/scs/tree/master/etcdstore) | ETCD based session store | | [etcdstore](https://github.com/alexedwards/scs/tree/master/etcdstore) | Etcd based session store |
| [firestore](https://github.com/alexedwards/scs/tree/master/firestore) | Google Cloud Firestore based session store | | [firestore](https://github.com/alexedwards/scs/tree/master/firestore) | Google Cloud Firestore based session store |
| [gormstore](https://github.com/alexedwards/scs/tree/master/gormstore) | GORM based session store | | [gormstore](https://github.com/alexedwards/scs/tree/master/gormstore) | GORM based session store |
| [leveldbstore](https://github.com/alexedwards/scs/tree/master/leveldbstore) | LevelDB based session store | | [leveldbstore](https://github.com/alexedwards/scs/tree/master/leveldbstore) | LevelDB based session store |

View File

@ -1,6 +1,6 @@
# etcdstore # etcdstore
A [ETCD](https://github.com/etcd-io/etcd) based session store for [SCS](https://github.com/alexedwards/scs). A [etcd](https://github.com/etcd-io/etcd) based session store for [SCS](https://github.com/alexedwards/scs).
## Setup ## Setup
@ -23,7 +23,7 @@ import (
var sessionManager *scs.SessionManager var sessionManager *scs.SessionManager
func main() { func main() {
// Establish connection to ETCD. // Establish connection to etcd.
cli, err := clientv3.New(clientv3.Config{ cli, err := clientv3.New(clientv3.Config{
Endpoints: []string{"host:2379"}, Endpoints: []string{"host:2379"},
DialTimeout: 5 * time.Second, DialTimeout: 5 * time.Second,
@ -56,7 +56,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
## Expired Session Cleanup ## Expired Session Cleanup
ETCD will [automatically remove](https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/) expired session keys. Etcd will [automatically remove](https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/) expired session keys.
## Key Collisions ## Key Collisions

View File

@ -14,13 +14,13 @@ type EtcdStore struct {
} }
// New returns a new EtcdStore instance. // New returns a new EtcdStore instance.
// The client parameter should be a pointer to a ETCD client instance. // The client parameter should be a pointer to a etcd client instance.
func New(client *clientv3.Client) *EtcdStore { func New(client *clientv3.Client) *EtcdStore {
return NewWithPrefix(client, "scs:session:") return NewWithPrefix(client, "scs:session:")
} }
// NewWithPrefix returns a new EtcdStore instance. The client parameter should be a pointer // NewWithPrefix returns a new EtcdStore instance. The client parameter should be a pointer
// to a ETCD client instance. The prefix parameter controls the ETCD key // to a etcd client instance. The prefix parameter controls the etcd key
// prefix, which can be used to avoid naming clashes if necessary. // prefix, which can be used to avoid naming clashes if necessary.
func NewWithPrefix(client *clientv3.Client, prefix string) *EtcdStore { func NewWithPrefix(client *clientv3.Client, prefix string) *EtcdStore {
return &EtcdStore{ return &EtcdStore{