shareds

package
v1.2.84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LockersBuilder added in v1.2.1

func LockersBuilder(options ...configs.Option) shareds.LockersBuilder

func NewLockers added in v1.2.1

func NewLockers(config configs.Config, options ...configs.Option) (lockers shareds.Lockers, err error)

NewLockers redis version must gt 7.0.5

func NewLockersWithClient added in v1.2.1

func NewLockersWithClient(client rueidis.Client) (lockers shareds.Lockers, err error)

NewLockersWithClient redis version must gt 7.0.5

func NewStore added in v1.2.1

func NewStore(config configs.Config, options ...configs.Option) (store shareds.Store, err error)

func NewStoreWithClient added in v1.2.1

func NewStoreWithClient(client rueidis.Client) (store shareds.Store, err error)

func NewWithClient added in v1.2.1

func NewWithClient(client rueidis.Client) (v shareds.Shared, err error)

func Shared added in v1.0.2

func Shared(options ...configs.Option) (v shareds.Shared)

func StoreBuilder added in v1.2.1

func StoreBuilder(options ...configs.Option) shareds.StoreBuilder

Types

type Locker added in v1.0.2

type Locker struct {
	// contains filtered or unexported fields
}

func (*Locker) Lock added in v1.0.2

func (locker *Locker) Lock(ctx context.Context) (err error)

func (*Locker) Unlock added in v1.0.2

func (locker *Locker) Unlock(ctx context.Context) (err error)

type Lockers added in v1.0.2

type Lockers struct {
	// contains filtered or unexported fields
}

func (*Lockers) Acquire added in v1.2.1

func (lockers *Lockers) Acquire(_ context.Context, key []byte, _ time.Duration) (locker shareds.Locker, err error)

func (*Lockers) Close added in v1.2.1

func (lockers *Lockers) Close()

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Close added in v1.2.1

func (store *Store) Close()

func (*Store) Expire added in v1.2.84

func (store *Store) Expire(ctx context.Context, key []byte, ttl time.Duration) (err error)

func (*Store) Get added in v1.2.1

func (store *Store) Get(ctx context.Context, key []byte) (value []byte, has bool, err error)

func (*Store) Incr added in v1.2.1

func (store *Store) Incr(ctx context.Context, key []byte, delta int64) (v int64, err error)

func (*Store) Remove added in v1.2.1

func (store *Store) Remove(ctx context.Context, key []byte) (err error)

func (*Store) Set added in v1.2.1

func (store *Store) Set(ctx context.Context, key []byte, value []byte) (err error)

func (*Store) SetWithTTL added in v1.2.1

func (store *Store) SetWithTTL(ctx context.Context, key []byte, value []byte, ttl time.Duration) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL