Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettings = Settings{ RetryableCodes: []codes.Code{ codes.Canceled, codes.Unknown, codes.DeadlineExceeded, codes.Aborted, codes.Unavailable, }, Backoff: backoff.DefaultConfig, }
DefaultSettings for Interceptor
View Source
var ErrStreamClosed = errors.New("grpc: stream closed")
ErrStreamClosed is returned when trying to call SendMsg or RecvMsg on a closed stream
Functions ¶
func Interceptor ¶
func Interceptor(settings Settings) grpc.StreamClientInterceptor
Interceptor automatically restarts streams on non-expected errors To do so, the application should create a for-loop around RecvMsg, which returns the same errors that are received from the server.
An io.EOF indicates the end of the stream ¶
To stop the reconnect behaviour, you have to cancel the context
Types ¶
Click to show internal directories.
Click to hide internal directories.