srv

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 21 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