Documentation ¶
Index ¶
- Variables
- type AsyncRequest
- type AsyncResponse
- type CircuitBrakerConfig
- type Client
- type DefaultClient
- func (c *DefaultClient) AsyncRequests(as []AsyncRequest) []AsyncResponse
- func (c *DefaultClient) Close()
- func (c *DefaultClient) Publish(topic string, v interface{}, meta map[string]string) error
- func (c *DefaultClient) Request(service, method string, reqv interface{}, respv interface{}, ...) (int, error)
- type Direct
- type Discovery
- type HeaderFunc
- type Method
- type Option
- func Broker(b broker.Broker) Option
- func Encoder(enc encoder.Encoder) Option
- func ErrCircuitOpen(s string) Option
- func ErrMaxConcurrency(s string) Option
- func ErrTimeout(s string) Option
- func ErrorPercentThreshold(n int) Option
- func Header(hdr map[string]string) Option
- func MaxConcurrentRequests(n int) Option
- func RequestVolumeThreshold(n int) Option
- func SleepWindow(n int) Option
- func TLSConfig(config *tls.Config) Option
- func Timeout(n int) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultEncoder = json.NewEncoder() DefaultTimeout = 1000 DefaultMaxConcurrentRequests = 0 DefaultRequestVolumeThreshold = 5 DefaultSleepWindow = 1000 DefaultErrorPercentThreshold = 50 )
Functions ¶
This section is empty.
Types ¶
type AsyncRequest ¶
type AsyncResponse ¶
type CircuitBrakerConfig ¶
type Client ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
func (*DefaultClient) AsyncRequests ¶
func (c *DefaultClient) AsyncRequests(as []AsyncRequest) []AsyncResponse
func (*DefaultClient) Close ¶
func (c *DefaultClient) Close()
type HeaderFunc ¶
type Option ¶
type Option func(o *option)
func ErrCircuitOpen ¶
func ErrMaxConcurrency ¶
func ErrTimeout ¶
func ErrorPercentThreshold ¶
func MaxConcurrentRequests ¶
func RequestVolumeThreshold ¶
func SleepWindow ¶
Click to show internal directories.
Click to hide internal directories.