memorykv

package
v1.5.49-alpha-20230325... Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryKvBucket

type MemoryKvBucket interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte) error
	SetEx(key string, value []byte, ttl time.Duration) error
	Delete(key string) error
	Expire(key string, ttl time.Duration) error
}

type MemoryKvBucketImpl

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

func (*MemoryKvBucketImpl) Delete

func (kvBucket *MemoryKvBucketImpl) Delete(key string) error

func (*MemoryKvBucketImpl) Expire

func (kvBucket *MemoryKvBucketImpl) Expire(key string, ttl time.Duration) error

func (*MemoryKvBucketImpl) Get

func (kvBucket *MemoryKvBucketImpl) Get(key string) ([]byte, error)

func (*MemoryKvBucketImpl) Set

func (kvBucket *MemoryKvBucketImpl) Set(key string, value []byte) error

func (*MemoryKvBucketImpl) SetEx

func (kvBucket *MemoryKvBucketImpl) SetEx(key string, value []byte, ttl time.Duration) error

type MemoryKvDb

type MemoryKvDb interface {
	GetBucket(name string) MemoryKvBucket
}

func NewMemoryKvDb

func NewMemoryKvDb(options Options) MemoryKvDb

type MemoryKvDbImpl

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

func (*MemoryKvDbImpl) GetBucket

func (kvDb *MemoryKvDbImpl) GetBucket(name string) MemoryKvBucket

type Options

type Options struct {
	Name string
}

Jump to

Keyboard shortcuts

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