package rpc

Import Path
	github.com/gotd/td/internal/rpc (on go.dev)

Dependency Relation
	imports 9 packages, and imported by one package

Involved Source Files ack.go Package rpc implements rpc engine. engine.go errors.go external.go options.go
Package-Level Type Names (total 6, all are exported)
/* sort exporteds by: | */
DropHandler handles drop rpc requests.
Engine handles RPC requests. Close gracefully closes the engine. All pending requests will be awaited. All Do method calls of closed engine will return ErrEngineClosed error. Do sends request to server and blocks until response is received, performing multiple retries if needed. ForceClose forcibly closes the engine. All pending requests will be canceled. All Do method calls of closed engine will return ErrEngineClosed error. NotifyAcks notifies engine about received acknowledgements. NotifyError notifies engine about received RPC error. NotifyResult notifies engine about received RPC response. func New(send Send, cfg Options) *Engine
Options of rpc engine. Clock clock.Clock DropHandler DropHandler Logger *zap.Logger MaxRetries int RetryInterval time.Duration func New(send Send, cfg Options) *Engine
Request represents client RPC request. Input bin.Encoder MsgID int64 Output bin.Decoder SeqNo int32 func NopDrop(Request) error func (*Engine).Do(ctx context.Context, req Request) error
RetryLimitReachedErr means that server does not acknowledge request after multiple retries. Retries int (*RetryLimitReachedErr) Error() string Is reports whether err is RetryLimitReachedErr. *RetryLimitReachedErr : error
Send is a function that sends requests to the server. func New(send Send, cfg Options) *Engine
Package-Level Functions (total 3, all are exported)
New creates new rpc Engine.
NopDrop does nothing.
NopSend does nothing.
Package-Level Variables (only one, which is exported)
ErrEngineClosed means that engine was closed.