dfdaemon

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaunchPeerServer added in v1.0.1

func LaunchPeerServer(cfg config.Properties) error

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
p2p

Jump to

Keyboard shortcuts

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