Documentation ¶
Overview ¶
Package invokers contains some middlewares and helpers to work with RPC invokers.
Index ¶
- Constants
- type Object
- type Waiter
- func (w *Waiter) InvokeRaw(ctx context.Context, input bin.Encoder, output bin.Decoder) error
- func (w *Waiter) Run(ctx context.Context) error
- func (w *Waiter) WithClock(c clock.Clock) *Waiter
- func (w *Waiter) WithRetryLimit(retryLimit int) *Waiter
- func (w *Waiter) WithTick(tick time.Duration) *Waiter
- func (w *Waiter) WithWaitLimit(waitLimit int) *Waiter
Constants ¶
View Source
const ErrFloodWait = "FLOOD_WAIT"
ErrFloodWait is error type of "FLOOD_WAIT" error.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object interface {
TypeID() uint32
}
Object is a abstraction for Telegram API object with TypeID.
type Waiter ¶
type Waiter struct {
// contains filtered or unexported fields
}
Waiter is a invoker middleware to handle FLOOD_WAIT errors from Telegram.
func (*Waiter) WithRetryLimit ¶
WithRetryLimit sets retry limit to use.
func (*Waiter) WithWaitLimit ¶
WithWaitLimit sets wait limit to use.
Click to show internal directories.
Click to hide internal directories.