 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultRedirectSettings = RedirectSettings{ MaxAttempts: 9, MaxBackoffPeriod: 13 * time.Second, MinBackoffPeriod: 500 * time.Millisecond, } )
var DisconnectionDetector = func(disconnect func()) mesos.ResponseDecorator {
	return mesos.ResponseDecoratorFunc(func(resp mesos.Response) mesos.Response {
		return &mesos.ResponseWrapper{
			Response: resp,
			Decoder:  disconnectionDecoder(resp, disconnect),
		}
	})
}
    DisconnectionDetector is a programmable response decorator that attempts to detect errors that should transition the state from "connected" to "disconnected". Detector implementations are expected to invoke the `disconnect` callback in order to initiate the disconnection.
The default implementation will transition to a disconnected state when:
- an error occurs while decoding an object from the subscription stream
- mesos reports an ERROR-type scheduler.Event object via the subscription stream
- an object on the stream does not decode to a *scheduler.Event (sanity check)
Consumers of this package may choose to override default behavior by overwriting the default value of this var, but should exercise caution: failure to properly transition to a disconnected state may cause subsequent Call operations to fail (without recourse).
Functions ¶
Types ¶
type Option ¶
type Option func(*client) Option
Option is a functional configuration option type
func AllowReconnection ¶ added in v0.0.6
func MaxRedirects ¶
MaxRedirects is a functional option that sets the maximum number of per-call HTTP redirects for a scheduler client
type RedirectSettings ¶
type StateError ¶
type StateError string
func (StateError) Error ¶
func (err StateError) Error() string