server

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidServerRunner = errors.New("invalid server runner")
)

Functions

func PrepareService

func PrepareService(ctx context.Context, service model.HttpServicer, buildinfo model.BuildInfo,
	serverConfig configs.ServerConfiger, testConfig configs.TestConfiger, mux *chi.Mux,
) (func(), error)

func RegisterHttpService

func RegisterHttpService(factory func() model.HttpServicer)

func RunHttpServer

func RunHttpServer(h http.Handler, shutdown <-chan struct{}, addr string, log *slog.Logger)

func RunServices

func RunServices(ctx context.Context, buildinfo model.BuildInfo, serviceNames []string,
	serverConfig configs.ServerConfiger, testConfig configs.TestConfiger,
) error

Types

type ConfigSetter

type ConfigSetter interface {
	SetListenAddr(string)
	SetInstance(string)
	SetCommand(string)
	SetJaegerURL(string)
	GetOptions() []string
}

Jump to

Keyboard shortcuts

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