http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

nolint:unused All definition in this package expect for the config object are used to ensure config validation. Validation process is made through reflexion so unused linter does not see it.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPort = errors.New("invalid HTTP port")

Functions

func NewHTTP

func NewHTTP(httpConfig *Config, endpoints *endpoints.Endpoints) transport.Server

Types

type Config

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

func (Config) Check

func (config Config) Check() error

func (Config) GetAddress

func (config Config) GetAddress() string

type HTTP

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

func (*HTTP) GetAddress

func (transport *HTTP) GetAddress() string

func (*HTTP) ListenAndServe

func (transport *HTTP) ListenAndServe() error

func (*HTTP) Shutdown

func (transport *HTTP) Shutdown() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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