mux

package module
v0.0.0-...-0a22e48 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mux

多路复用器

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(replicas int, fn consistenthash.Hash) *consistenthash.Map

New 创建一个实例

func Process

func Process(procArr []string, channelLen int, timeoutSec int, m *consistenthash.Map, messaageHandler HandlerCallBack, message <-chan []byte, distributeKeyHandler GetdistributeKeyCallBack, timeoutHandler HandlerTimeoutCallBack) error

Process 数据处理,并发处理

Types

type Consumer

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

Consumer 消费者信息

type GetdistributeKeyCallBack

type GetdistributeKeyCallBack func(msg []byte) (key string, err error)

GetdistributeKeyCallBack 获取分发键值

type HandlerCallBack

type HandlerCallBack func(bucketName string, msg []byte)

HandlerCallBack 处理回调函数

type HandlerTimeoutCallBack

type HandlerTimeoutCallBack func()

HandlerTimeoutCallBack 数据处理超时回调函数,一般用于数据流监控, 监控数据是否产生出现了异常

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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