server

package
v0.0.0-...-b40c5a5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option represents the available options

func WithGlobalConfig

func WithGlobalConfig(globalConfig *config.Specification) Option

WithGlobalConfig sets the global configuration

func WithMetricsClient

func WithMetricsClient(client client.Client) Option

WithMetricsClient sets the metric provider

func WithProvider

func WithProvider(provider api.Repository) Option

WithProvider sets the configuration provider

type Server

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

Server is the Janus server

func New

func New(opts ...Option) *Server

New creates a new instance of Server

func (*Server) Close

func (s *Server) Close() error

Close closes the server

func (*Server) Start

func (s *Server) Start() error

Start starts the server

func (*Server) StartWithContext

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

StartWithContext starts the server and Stop/Close it when context is Done

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server

func (*Server) Wait

func (s *Server) Wait()

Wait blocks until server is shutted down.

Jump to

Keyboard shortcuts

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