service

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartWebServer

func StartWebServer(data *Data) error

StartWebServer starts the HTTP service and listens for the requests

Types

type Data

type Data struct {
	Port     int
	Handlers []HandlerWrap
}

Data is service operation data

type HandlerWrap

type HandlerWrap interface {
	Valid(r *http.Request) bool
	Handler() http.Handler
	Info() string
	Name() string
	Priority() int
}

HandlerWrap for check if handler valid

func NewHandler

func NewHandler(name string, cfg *viper.Viper, ms mongodb.SProvider) (HandlerWrap, error)

NewHandler creates handler based on config

type IPManager

type IPManager interface {
	CheckCreate(string, float64) error
}

IPManager manages IP in DB

Jump to

Keyboard shortcuts

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