dfdaemon

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s *Server) error

Option is the functional option for creating a server

func WithAddr

func WithAddr(addr string) Option

WithAddr sets the address the server listens on

func WithProxy

func WithProxy(p *proxy.Proxy) Option

WithProxy sets the proxy

func WithTLSFromFile

func WithTLSFromFile(certFile, keyFile string) Option

WithTLSFromFile sets the tls config for the server from the given key pair file

type Server

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

Server represents the dfdaemon server

func New

func New(opts ...Option) (*Server, error)

New returns a new server instance

func NewFromConfig

func NewFromConfig(cfg config.Properties) (*Server, error)

NewFromConfig returns a new server instance from given configuration

func (*Server) Start

func (s *Server) Start() error

Start runs dfdaemon's http server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop gracefully stops the dfdaemon http server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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