dfdaemon

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 1

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