package
Version:
v0.0.0-...-58ec719
Opens a new window with list of versions in this module.
Published: Oct 18, 2024
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func NewGoStore(authExpiration, aclExpiration, authJitter, aclJitter time.Duration, ...) *goStore
-
func NewRedisClusterStore(password string, addresses []string, ...) *redisStore
-
func NewSingleRedisStore(host, port, password string, db int, ...) *redisStore
-
type Store
func NewGoStore(authExpiration, aclExpiration, authJitter, aclJitter time.Duration, refreshExpiration bool) *goStore
NewGoStore initializes a cache using go-cache as the store.
func NewRedisClusterStore(password string, addresses []string, authExpiration, aclExpiration, authJitter, aclJitter time.Duration, refreshExpiration bool) *redisStore
NewSingleRedisStore initializes a cache using a Redis Cluster as the store.
func NewSingleRedisStore(host, port, password string, db int, authExpiration, aclExpiration, authJitter, aclJitter time.Duration, refreshExpiration bool) *redisStore
NewSingleRedisStore initializes a cache using a single Redis instance as the store.
type Store interface {
SetAuthRecord(ctx context.Context, username, password, granted string) error
CheckAuthRecord(ctx context.Context, username, password string) (bool, bool)
SetACLRecord(ctx context.Context, username, topic, clientid string, acc int, granted string) error
CheckACLRecord(ctx context.Context, username, topic, clientid string, acc int) (bool, bool)
Connect(ctx context.Context, reset bool) bool
Close()
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.