service

package
v0.0.0-...-35c14a5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(nh EvaluationHandler) http.Handler

NewRouter is a construction function for router that handles evaluation operations.

Types

type EvaluationHandler

type EvaluationHandler interface {
	Evaluate() func(w http.ResponseWriter, r *http.Request)
	Validate() func(w http.ResponseWriter, r *http.Request)
	Errors() func(w http.ResponseWriter, r *http.Request)
}

EvaluationHandler is a contract to a notification handler.

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(template string, args ...interface{})
	Fatalf(template string, args ...interface{})
}

Logger is a contract to a logger implementation.

type Service

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

Service holds functionality for starting and stopping an HTTP server.

func New

func New(config *config.Config, logger Logger, router http.Handler) (*Service, error)

New is a construction function for the HTTP server.

func (*Service) Start

func (s *Service) Start()

Start starts the server.

func (*Service) Stop

func (s *Service) Stop()

Stop stops the server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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