api

package
v0.0.0-...-8fb9c67 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package api configures an http server for administration and application resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTimestamp

func MakeTimestamp() int64

func New

func New(isMaster bool) (*chi.Mux, error)

New configures application resources and routes.The isMaster parameter determines if we run in discovery mode discoService determines the discovery backend to use

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server provides an http.Server.

func NewServer

func NewServer(isMaster bool) (*Server, error)

NewServer creates and configures an APIServer serving all application routes. isMaster determines the API set to provide, and if enabled initializes the Moloon Controller

func (*Server) Start

func (srv *Server) Start()

Start runs ListenAndServe on the http.Server with graceful shutdown.

Directories

Path Synopsis
Package controller implements the APIs
Package controller implements the APIs

Jump to

Keyboard shortcuts

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