container

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BFContainer added in v0.0.5

type BFContainer interface {
	Export() (map[int32]map[int64]bool, error)
	Import(map[int32]map[int64]bool) error
	GetBit(conainterId int32, index int64) (bool, error)
	SetBit(conainterId int32, index int64) SetStatus

	GetSize() int64
	SetSize(int64)
	IncreaseSize()

	Reset() bool
	GetMaxBitSize() int64
}

type MemoryContainer

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

func NewMemoryContainer

func NewMemoryContainer() *MemoryContainer

func (*MemoryContainer) Export added in v0.0.5

func (c *MemoryContainer) Export() (map[int32]map[int64]bool, error)

func (*MemoryContainer) GetBit

func (c *MemoryContainer) GetBit(containerId int32, val int64) (bool, error)

func (*MemoryContainer) GetMaxBitSize

func (c *MemoryContainer) GetMaxBitSize() int64

func (*MemoryContainer) GetSize added in v0.0.5

func (c *MemoryContainer) GetSize() int64

func (*MemoryContainer) Import added in v0.0.5

func (c *MemoryContainer) Import(data map[int32]map[int64]bool) error

func (*MemoryContainer) IncreaseSize added in v0.0.5

func (c *MemoryContainer) IncreaseSize()

func (*MemoryContainer) Reset

func (c *MemoryContainer) Reset() bool

func (*MemoryContainer) SetBit

func (c *MemoryContainer) SetBit(containerId int32, val int64) SetStatus

func (*MemoryContainer) SetSize added in v0.0.5

func (c *MemoryContainer) SetSize(size int64)

type RedisContainer added in v0.0.5

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

func NewRedisClusterContainer added in v0.0.5

func NewRedisClusterContainer(opt *redis.ClusterOptions, keyPrefix string, maxKeyNum int32) *RedisContainer

func NewRedisContainer added in v0.0.5

func NewRedisContainer(opt *redis.Options, keyPrefix string, maxKeyNum int32) *RedisContainer

func (*RedisContainer) Export added in v0.0.5

func (c *RedisContainer) Export() (map[int32]map[int64]bool, error)

func (*RedisContainer) GetBit added in v0.0.5

func (c *RedisContainer) GetBit(containerId int32, val int64) (bool, error)

func (*RedisContainer) GetMaxBitSize added in v0.0.5

func (c *RedisContainer) GetMaxBitSize() int64

func (*RedisContainer) GetSize added in v0.0.5

func (c *RedisContainer) GetSize() int64

func (*RedisContainer) Import added in v0.0.5

func (c *RedisContainer) Import(data map[int32]map[int64]bool) error

func (*RedisContainer) IncreaseSize added in v0.0.5

func (c *RedisContainer) IncreaseSize()

func (*RedisContainer) Reset added in v0.0.5

func (c *RedisContainer) Reset() bool

func (*RedisContainer) SetBit added in v0.0.5

func (c *RedisContainer) SetBit(containerId int32, val int64) SetStatus

func (*RedisContainer) SetSize added in v0.0.5

func (c *RedisContainer) SetSize(size int64)

type SetStatus

type SetStatus int32
const (
	SetBitFailed SetStatus = 0
	SetBitOK     SetStatus = 1
	SetBitExists SetStatus = 2
)

Jump to

Keyboard shortcuts

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