Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
A Server can be run synchronously and return an error.
Servers are typically used with oklog/run.Group.
func MultiServer ¶
MultiServer returns a new kit.Server which will run all of the provided servers until one of them fails or the server is stopped.
type ServerFunc ¶
type ServerFunc func() error
ServerFunc is a function which implements the Server interface.
func (ServerFunc) Run ¶
func (fn ServerFunc) Run() error
Run calls fn and returns any errors.
It implements the Server interface.
func (ServerFunc) Stop ¶
func (fn ServerFunc) Stop(error)
Stop is a noop for gradual compatibility with oklog run.Group.
It implements the Server interface.
type ServerFuncs ¶
ServerFuncs implements the Server interface with provided functions.
func (ServerFuncs) Run ¶
func (sf ServerFuncs) Run() error
Run calls RunFunc and returns any errors.
It implements the Server interface.
func (ServerFuncs) Stop ¶
func (sf ServerFuncs) Stop(err error)
Stop calls StopFunc, if it's non-nil.
It implements the Server interface.