Documentation ¶
Index ¶
- Variables
- func MapToSlice[V comparable](m map[V]struct{}) []V
- func MkdirAllX(path string, perm os.FileMode) error
- func NewSaltingWriter(w io.Writer, salt []byte) io.Writer
- func SaltXOR(data, salt []byte) []byte
- func SaltXOROffset(data, salt []byte, off int) []byte
- func SliceToMap[V comparable](s []V) map[V]struct{}
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
var ErrPoolClosed = ants.ErrPoolClosed
ErrPoolClosed is returned when submitting task to a closed pool.
Functions ¶
func MapToSlice ¶ added in v0.40.0
func MapToSlice[V comparable](m map[V]struct{}) []V
MapToSlice converts the map to a slice. Order is not fixed and _is not_ ascending or descending.
func MkdirAllX ¶ added in v0.24.0
MkdirAllX calls os.MkdirAll with the passed permissions but with +x for a user and a group. This makes the created dir openable regardless of the passed permissions.
func NewSaltingWriter ¶ added in v0.14.1
NewSaltingWriter returns io.Writer instance that applies salt to written data and write the result to w.
func SaltXOROffset ¶ added in v0.14.1
SaltXOROffset xors bits of data with salt starting from off byte repeating salt if necessary.
func SliceToMap ¶ added in v0.40.0
func SliceToMap[V comparable](s []V) map[V]struct{}
SliceToMap converts any slice with comparable elements to a map.
Types ¶
type WorkerPool ¶
type WorkerPool interface { // Submit queues a function for execution // in a separate routine. // // Implementation must return any error encountered // that prevented the function from being queued. Submit(func()) error // Release releases worker pool resources. All `Submit` calls will // finish with ErrPoolClosed. It doesn't wait until all submitted // functions have returned so synchronization must be achieved // via other means (e.g. sync.WaitGroup). Release() }
WorkerPool represents a tool to control the execution of go-routine pool.
func NewPseudoWorkerPool ¶ added in v0.26.1
func NewPseudoWorkerPool() WorkerPool
NewPseudoWorkerPool returns a new instance of a synchronous worker pool.
Directories ¶
Path | Synopsis |
---|---|
Package glagolitsa provides Glagolitic script for NeoFS Alphabet.
|
Package glagolitsa provides Glagolitic script for NeoFS Alphabet. |
logger
|
|