Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter counter is a multi-thread safe counters
type WaitWraper ¶
WaitWraper is a method wrapper based sync.Waitgroup
func (*WaitWraper) Wrap ¶
func (w *WaitWraper) Wrap(fn func())
Wrap encapsulates the method fn with sync.Waitgroup to ensure its execution.
Example ¶
fn := func() { fmt.Println("this just example for wrap!") } ww := WaitWraper{} ww.Wrap(fn) ww.Wait()
Output: this just example for wrap!
Directories ¶
Path | Synopsis |
---|---|
container
|
|
omap
Package omap 通过红黑树实现了高效率的有序map。
|
Package omap 通过红黑树实现了高效率的有序map。 |
hash
|
|
consistent
package consistent 提供了一致性哈希的计算功能,以用于分布式请求的负载均衡。
|
package consistent 提供了一致性哈希的计算功能,以用于分布式请求的负载均衡。 |
hrw
Package hrw provides an implementation of Highest Random Weight hashing, an alternative to consistent hashing which is both simple and fast.
|
Package hrw provides an implementation of Highest Random Weight hashing, an alternative to consistent hashing which is both simple and fast. |
这个包提供服务端加解密的基本方法。
|
这个包提供服务端加解密的基本方法。 |
Package pubsub is a simple subscription service module that provides asynchronous message distribution based on single computer memory
|
Package pubsub is a simple subscription service module that provides asynchronous message distribution based on single computer memory |
Package singleflight provide a duplicate function call suppression mechisam.
|
Package singleflight provide a duplicate function call suppression mechisam. |
提供运行程序的启动、停止的框架,标准化信号拦截的运行分块。
|
提供运行程序的启动、停止的框架,标准化信号拦截的运行分块。 |
Click to show internal directories.
Click to hide internal directories.