Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MaxTries represents the max count for retry MaxTries = 8 // MaxTimeout represents the timeout seconds MaxTimeout = 8 * time.Second // MaxDelay represents the delay seconds MaxDelay = 8 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailfastInvoker ¶
type FailfastInvoker struct {
// contains filtered or unexported fields
}
FailfastInvoker will be returned immediately when invoking timeout
type FailoverInvoker ¶
type FailoverInvoker struct {
// contains filtered or unexported fields
}
FailoverInvoker can be retry when invoke failed
func (*FailoverInvoker) Invoke ¶
func (f *FailoverInvoker) Invoke(ctx context.Context, conn *grpc.ClientConn, method string, request, response interface{}, opts ...grpc.CallOption) error
Invoke method invoke grpc.Invoke that can be retry when invoke failed
type FailsafeInvoker ¶
type FailsafeInvoker struct {
// contains filtered or unexported fields
}
FailsafeInvoker will be returned immediately when invoking timeout or failed
type Invoker ¶
type Invoker interface {
Invoke(ctx context.Context, conn *grpc.ClientConn, method string, request, response interface{}, opts ...grpc.CallOption) error
}
Invoker has a method Invoke used to invoke grpc.Invoke
Click to show internal directories.
Click to hide internal directories.