api

package
v0.0.0-...-132a92c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllChecks

func GetAllChecks(r *http.Request) (error, []byte)

GetAllChecks: write all checks' data to response writer

func GetAllSamples

func GetAllSamples(r *http.Request) (error, []byte)

GetAllSamples: write all samples' data to response writer

func GetAllServices

func GetAllServices(r *http.Request) (error, []byte)

GetAllServices: write all services' data to response writer

func GetCheck

func GetCheck(r *http.Request) (error, []byte)

GetCheck: write the specific check's data to response writer

func GetCluster

func GetCluster(r *http.Request) (error, []byte)

GetCluster: write whole cluster's information to response writer

func GetClusterNodes

func GetClusterNodes(r *http.Request) (error, []byte)

GetClusterNodes: write all checks' data to response writer

func GetClusterServices

func GetClusterServices(r *http.Request) (error, []byte)

GetClusterServices: write all checks' data to response writer

func GetNodeInfo

func GetNodeInfo(r *http.Request) (error, []byte)

GetNodeStatus: write the specific service's data to response writer

func GetNodeStatus

func GetNodeStatus(r *http.Request) (error, []byte)

GetNodeStatus: write the specific service's data to response writer

func GetSample

func GetSample(r *http.Request) (error, []byte)

GetSample: write the specific sample's data to response writer

func GetService

func GetService(r *http.Request) (error, []byte)

GetService: write the specific service's data to response writer

func Index

func Index(w http.ResponseWriter, r *http.Request)

Index: is the handler that manages the root api request

func PutCluster

func PutCluster(w http.ResponseWriter, r *http.Request)

PutClusterStatus: write all checks' data to response writer

func StartCheckEngine

func StartCheckEngine(r *http.Request) (error, []byte)

StartCheckEngine: is the handler that manages the start checks system request

Types

type ApiEngine

type ApiEngine struct {
	Routes []*ui.Route
}

func NewApiEngine

func NewApiEngine(e *environment.Environment) *ApiEngine

# # # ApiEngine struct: # ApiEngine defines all informataion required for API

func (*ApiEngine) AddRoute

func (a *ApiEngine) AddRoute(route *ui.Route)

AddRoute: for include a new route to API Routes

func (*ApiEngine) GenerateAPIRoutes

func (a *ApiEngine) GenerateAPIRoutes()

GenerateAPIRoutes: generate a set of routes to serve

func (*ApiEngine) GenerateAPIRoutesForCheck

func (a *ApiEngine) GenerateAPIRoutesForCheck()

GenerateAPIRoutesForCheck: generate a set of routes to serve

func (*ApiEngine) GenerateAPIRoutesForCluster

func (a *ApiEngine) GenerateAPIRoutesForCluster()

GenerateAPIRoutesForCheck: generate a set of routes to serve

func (*ApiEngine) GenerateAPIRoutesForNode

func (a *ApiEngine) GenerateAPIRoutesForNode()

GenerateAPIRoutesForNode: generate a set of routes to serve

func (*ApiEngine) GenerateAPIRoutesForSamples

func (a *ApiEngine) GenerateAPIRoutesForSamples()

GenerateAPIRoutesForSamples: generate a set of routes to serve

func (*ApiEngine) GenerateAPIRoutesForService

func (a *ApiEngine) GenerateAPIRoutesForService()

GenerateAPIRoutesForService: generate a set of routes to serve

func (*ApiEngine) GetCheckEngine

func (a *ApiEngine) GetCheckEngine() *check.CheckEngine

GetCheckEngine: return CHECKS from obect box

func (*ApiEngine) GetRoutes

func (a *ApiEngine) GetRoutes() []*ui.Route

GetRoutes: set routes for API

func (*ApiEngine) GetSampleEngine

func (a *ApiEngine) GetSampleEngine() *sample.SampleEngine

GetSampleEngine: return CHECKS from obect box

func (*ApiEngine) GetServiceEngine

func (a *ApiEngine) GetServiceEngine() *service.ServiceEngine

GetServiceEngine: return CHECKS from obect box

func (*ApiEngine) SayHi

func (sys *ApiEngine) SayHi()

# # Specific methods #---------------------------------------------------------------------

SayHi:

func (*ApiEngine) SetRoutes

func (a *ApiEngine) SetRoutes(routes []*ui.Route)

SetRoutes: set routes for API

type ObjectsBox

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

func NewObjectsBox

func NewObjectsBox() *ObjectsBox

func (*ObjectsBox) AddObject

func (o *ObjectsBox) AddObject(key string, obj interface{})

func (*ObjectsBox) GetObject

func (o *ObjectsBox) GetObject(key string) interface{}

Jump to

Keyboard shortcuts

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