accelerate

package
v0.0.0-...-7a5359b Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FNV32a

func FNV32a(text string) uint32

FNV32a calculating the hash code of a text

Types

type Accelerator

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

Accelerator putting your events and handling process into this accelerator to execute them in concurrency

func NewAccelerator

func NewAccelerator(size int, done <-chan struct{}) *Accelerator

NewAccelerator initializing a new accelerator

func (*Accelerator) Accelerate

func (ac *Accelerator) Accelerate(fn func(), hashKey string)

Accelerate The purpose of this accelerator is twofold: 1.dividing the events into a group of channels by calculating hash code of event's name 2.there is one goroutine for each channel is waiting for handling the accelerate request

type ExeRequest

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

ExeRequest ...

Jump to

Keyboard shortcuts

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