Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTimedOut ¶ added in v1.29.0
IsTimedOut asserts timedOutError.
Types ¶
type CallbackFunc ¶ added in v1.29.0
type CallbackFunc func(http.ResponseWriter, *http.Request) (interface{}, error)
type CallbackServer ¶ added in v1.29.0
type CallbackServer struct {
// contains filtered or unexported fields
}
func New ¶ added in v1.29.0
func New(config Config) (*CallbackServer, error)
func (*CallbackServer) Port ¶ added in v1.29.0
func (cs *CallbackServer) Port() int
func (*CallbackServer) Run ¶ added in v1.29.0
func (cs *CallbackServer) Run(ctx context.Context, callback CallbackFunc) (interface{}, error)
Run starts a server listening at a given path and port and calls a callback function as soon as that path is hit.
It blocks and waits until the given path is hit, or until the context deadline is reached, then shuts down the server and returns the result of the callback function.
Click to show internal directories.
Click to hide internal directories.