api

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const ForceStopTimeout = 5 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string `json:"host" yaml:"host"`
	Port int    `json:"port" yaml:"port"`
}

Config is a parameters for `http.Server`.

func (*Config) TCPAddr

func (c *Config) TCPAddr() string

TCPAddr returns tcp address for server.

func (*Config) Validate

func (c *Config) Validate() error

Validate - Validate config required fields

type Server

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

Server

func NewServer

func NewServer(config Config, router http.Handler) *Server

func (*Server) Init

func (s *Server) Init() error

func (*Server) Run

func (s *Server) Run(ctx uwe.Context) error

Jump to

Keyboard shortcuts

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