Package-Level Type Names (total 6, all are exported)
/* sort exporteds by: | */
DropHandler handles drop rpc requests.
Engine handles RPC requests.ackmap[int64]chan struct{}clockclock.Clockcloseduint32dropDropHandlerlog*zap.LoggermaxRetriesintmuxsync.MutexreqCancelcontext.CancelFunc Canceling pending requests in ForceClose.retryIntervaltime.Durationrpcmap[int64]func(*bin.Buffer, error) errorsendSendwgsync.WaitGroup 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.(*Engine) isClosed() bool(*Engine) removeAck(id int64) retryUntilAck resends the request to the server until request is
acknowledged.
Returns nil if acknowledge was received or error otherwise.(*Engine) waitAck(id int64) chan struct{}
func New(send Send, cfg Options) *Engine
RetryLimitReachedErr means that server does not acknowledge request
after multiple retries.Retriesint(*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.
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.