srv

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package srv provides the JSON RPC 2.0 API server and RPC functions. It calls out to the fatd/db package to obtain data about the current state saved to the DB.

Index

Constants

This section is empty.

Variables

View Source
var (
	APIVersion              = "1"
	FatdVersionHeaderKey    = http.CanonicalHeaderKey("Fatd-Version")
	FatdAPIVersionHeaderKey = http.CanonicalHeaderKey("Fatd-Api-Version")
)

Functions

func Start

func Start(ctx context.Context) (done <-chan struct{})

Start the server in its own goroutine. If stop is closed, the server is closed and any goroutines will exit. The done channel is closed when the server exits for any reason. If the done channel is closed before the stop channel is closed, an error occurred. Errors are logged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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