package
1.4.3
Repository: https://github.com/gotid/god.git
Documentation: pkg.go.dev

# Functions

ForAtomicBool 返回具有给定 d 的 AtomicBool。.
ForAtomicDuration 返回具有给定 d 的 AtomicDuration。.
ForAtomicFloat64 返回具有指定 val 的 AtomicFloat64。.
Guard 用锁保卫给定的函数 fn。.
NewAtomicBool 返回一个 AtomicBool。.
NewAtomicDuration 返回一个 AtomicDuration。.
NewAtomicFloat64 返回一个 AtomicFloat64。.
NewCond 返回一个 Cond。.
NewDoneChan 返回一个 DoneChan。.
NewImmutableResource 返回一个 ImmutableResource。.
NewLimit 返回一个给定大小的并发限制 Limit。.
NewLockedCalls 返回一个 LockedCalls。.
NewManagedResource 返回一个托管资源。.
NewPool 返回一个 Pool。.
NewRefResource 返回一个 RefResource。.
NewResourceManager 返回一个 ResourceManager。.
NewSingleFlight 返回一个 SingleFlight。.
NewTimeoutLimit 返回一个可并发借用n个资源的超时限制。.
Once 返回一个确保 fn 只会被调用一次的函数。.
WithMaxAge 返回一个自定义 Pool 使用期限的函数。.
WithRefreshIntervalOnFailure 设置失败时的刷新时间。 interval 为 0 会在失败时强制刷新。默认单位为 time.Second。.

# Variables

ErrLimitReturn 代表归还的资源多于借用的资源。.
ErrTimeout 代表借用超时的错误。.
ErrUseOfCleaned 代表使用了已清理资源的错误。.

# Structs

Barrier 用于在一个资源上设置并发屏障。.
Cond 用于等待一些条件。.
DoneChan 用作可以多次关闭并等待完成的通道。.
No description provided by the author
Limit 用于限制并发请求数。.
ManagedResource 托管资源。用于管理可能被破坏或重新获取的资源,例如连接。.
OnceGuard 用于确保资源只能被获取一次。.
No description provided by the author
RefResource 用于资源的引用计数。.
ResourceManager 是一个用于管理资源的管理器。.
SpinLock 自旋锁.
TimeoutLimit 用于限时借用。.

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

AtomicBool 是一个 atomic bool 的实现。.
AtomicDuration 是一个 atomic duration 的实现。.
AtomicFloat64 是一个 atomic float 64 的实现。.
No description provided by the author
No description provided by the author