lib_gc_pool

package
v0.0.0-...-e28984d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolMaker

type PoolMaker interface {
	GetPool(size int32) Pooler
}
var POOLMaker PoolMaker

Pool factory --------------------------------------------------------

type PoolPerKeys

type PoolPerKeys struct {
	Name   string
	PKPool Pooler
	Keys   *[][]byte
}

type PoolSharderFactory_I

type PoolSharderFactory_I interface {
	AddPoolShardingAdapter(name string, pool_sharder PoolSharder_I) error
	GetPoolSharder(name string) (PoolSharder_I, error)
}

Pool sharder factory

var PoolSharderFactory PoolSharderFactory_I

type PoolSharder_I

type PoolSharder_I interface {
	InitializeWithWeightedPools(pools []*ShardedPool) error
	GetPoolPerKey(key *[]byte) (*ShardedPool, error)
	GetPoolsPerKeys(keys *[][]byte) (map[string]*PoolPerKeys, error)
	GetInstance() (PoolSharder_I, error)
}

type Poolable

type Poolable struct {
	Item interface{}
}

type Pooler

type Pooler interface {
	GetSize() int32
	GetPool() chan (*Poolable)
}

type ShardedPool

type ShardedPool struct {
	Name   string
	PKPool Pooler
	Weight int
}

Pool sharder implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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