Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchController ¶
type MatchController struct {
// contains filtered or unexported fields
}
func NewMatchController ¶
func NewMatchController(rateByte int, statFunc func(int)) *MatchController
func (*MatchController) DealTransferConn ¶
func (mc *MatchController) DealTransferConn(tc *TransferConn, timeout time.Duration) error
block until there is a same ID transfer conn or timeout
type Options ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
func NewRegister ¶
func (*Register) Reset ¶ added in v0.2.0
func (r *Register) Reset()
Reset can be only called after Close
func (*Register) RunKeepAlive ¶
func (r *Register) RunKeepAlive()
type TrafficLimiter ¶ added in v0.2.0
type TrafficLimiter struct {
// contains filtered or unexported fields
}
func NewTrafficLimiter ¶ added in v0.2.0
func NewTrafficLimiter(maxCountPerDay uint64, exceedLimitCallback func(), restoreCallback func()) *TrafficLimiter
func (*TrafficLimiter) AddCount ¶ added in v0.2.0
func (tl *TrafficLimiter) AddCount(count uint64)
func (*TrafficLimiter) Run ¶ added in v0.2.0
func (tl *TrafficLimiter) Run()
type TransferConn ¶
type TransferConn struct {
// contains filtered or unexported fields
}
func NewTransferConn ¶
func NewTransferConn(id string, conn net.Conn, isSender bool) *TransferConn
Click to show internal directories.
Click to hide internal directories.