internal

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseServerInfos

func ParseServerInfos(s Server) map[string]interface{}

ParseServerInfos format the infos about Server at map, used for return data at /stats

func SetServerRun

func SetServerRun(s Server)

SetServerRun set the instance of server that will running

Types

type FakeServer

type FakeServer struct{}

FakeServer interface that define the contract to be used between monitor.http and workerServer for tests only

func (FakeServer) Healthy

func (f FakeServer) Healthy() bool

Healthy return the health of server

func (FakeServer) Infos

func (f FakeServer) Infos() map[string]interface{}

Infos return the empty infos

func (FakeServer) Workers

func (f FakeServer) Workers() []*worker.Worker

Workers return the worker from FakeServer

type Server

type Server interface {
	Workers() []*worker.Worker
	Healthy() bool
	Infos() map[string]interface{}
}

Server interface that define the contract to be used between monitor.http and workerServer

func GetServerRun

func GetServerRun() Server

GetServerRun return the instance of server that still running

Jump to

Keyboard shortcuts

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