Documentation ¶
Overview ¶
Package rest implements the embedded REST server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(ctx context.Context, logger *zap.Logger, l net.Listener, c *cache.Cache, apiKey string) (err error)
Serve takes ownership of l and starts serving HTTP requests from clients it accepts on it via h until l encounters a terminal error or ctx has been terminated.
When Serve returns l will be closed. Contrary to similar functions of the http package, Serve reports nil instead of http.ErrServerClosed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.