httpd

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled     bool   `toml:"enabled"`
	BindAddress string `toml:"bind_address"`
	UseTls      bool   `toml:"use_tls"`
	CertFile    string `toml:"cert_file"`
	KeyFile     string `toml:"key_file"`
}

func NewConfig

func NewConfig() *Config

func (Config) String

func (c Config) String() string

type Service

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

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c *Config) *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

Close closes the underlying listener.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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