util

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSaltingWriter added in v0.14.1

func NewSaltingWriter(w io.Writer, salt []byte) io.Writer

NewSaltingWriter returns io.Writer instance that applies salt to written data and write the result to w.

func SaltXOR

func SaltXOR(data, salt []byte) []byte

SaltXOR xors bits of data with salt repeating salt if necessary.

func SaltXOROffset added in v0.14.1

func SaltXOROffset(data, salt []byte, off int) (result []byte)

SaltXOROffset xors bits of data with salt starting from off byte repeating salt if necessary.

Types

type SyncWorkerPool

type SyncWorkerPool struct{}

SyncWorkerPool represents synchronous worker pool.

func (SyncWorkerPool) Submit

func (SyncWorkerPool) Submit(fn func()) error

Submit executes passed function immediately.

Always returns nil.

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
}

WorkerPool represents the tool for control the execution of go-routine pool.

Jump to

Keyboard shortcuts

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