server

package
v0.0.0-...-ce8de81 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 18 Imported by: 2

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 WithProfiler

func WithProfiler(enabled, public bool) Option

WithProfiler enables or disables profiler

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 shut down.

Jump to

Keyboard shortcuts

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