const timeToWaitForReady … type ReadyFunc … type Handler … // Handles returns true for methods that this handler supports func (h *Handler) Handles(operation Operation) bool { … } // NewHandler creates a new base handler that handles the passed // in operations func NewHandler(ops ...Operation) *Handler { … } // SetReadyFunc allows late registration of a ReadyFunc to know if the handler is ready to process requests. func (h *Handler) SetReadyFunc(readyFunc ReadyFunc) { … } // WaitForReady will wait for the readyFunc (if registered) to return ready, and in case of timeout, will return false. func (h *Handler) WaitForReady() bool { … }