rest

package
v0.0.0-...-5a03b40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package rest implements the embedded REST server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(logger *zap.Logger, on string) (l net.Listener, err error)

Bind binds a TCP listener on the given address and returns a reference to it.

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.

Directories

Path Synopsis
internal
render
Package render implements rendering helpers.
Package render implements rendering helpers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL