server

package
Version: v0.0.0-...-cc887b7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API Server for server

This API provides AdvantEDGE microservice & scenario deployment status information collected in the Monitoring Engine.

Micro-service
meep-mon-engine

Type & Usage
Platform interface to retrieve AdvantEDGE microservice & scenario deployment status information

Details
API details available at your-AdvantEDGE-ip-address/api

Overview

This server was generated by the [swagger-codegen] (https://github.com/swagger-api/swagger-codegen) project.
By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

  • API version: 1.0.0
  • Build date: 2021-04-27T13:27:30.681-04:00
Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Index

Constants

View Source
const EVENT_POD_ADDED = 0

index in array

View Source
const EVENT_POD_DELETED = 2
View Source
const EVENT_POD_MODIFIED = 1

Variables

This section is empty.

Functions

func GetStates

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

func Index

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

func Init

func Init() (err error)

Init - Mon Engine initialization

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter() *mux.Router

func Run

func Run() (err error)

Run - Mon Engine monitoring thread

func Stop

func Stop()

Types

type MonEngineInfo

type MonEngineInfo struct {
	PodType              string
	PodName              string
	Namespace            string
	MeepApp              string
	MeepOrigin           string
	MeepScenario         string
	Release              string
	Phase                string
	PodInitialized       string
	PodReady             string
	PodScheduled         string
	PodUnschedulable     string
	PodConditionError    string
	ContainerStatusesMsg string
	NbOkContainers       int
	NbTotalContainers    int
	NbPodRestart         int
	LogicalState         string
	StartTime            string
}

type PodStatus

type PodStatus struct {

	// Pod type
	PodType string `json:"podType,omitempty"`

	// Pod Sandbox
	Sandbox string `json:"sandbox,omitempty"`

	// Pod name
	Name string `json:"name,omitempty"`

	// Pod namespace
	Namespace string `json:"namespace,omitempty"`

	// Pod process name
	MeepApp string `json:"meepApp,omitempty"`

	// Pod origin(core, scenario)
	MeepOrigin string `json:"meepOrigin,omitempty"`

	// Pod scenario name
	MeepScenario string `json:"meepScenario,omitempty"`

	// Pod phase
	Phase string `json:"phase,omitempty"`

	// Pod initialized (true/false)
	PodInitialized string `json:"podInitialized,omitempty"`

	// Pod ready (true/false)
	PodReady string `json:"podReady,omitempty"`

	// Pod scheduled (true/false)
	PodScheduled string `json:"podScheduled,omitempty"`

	// Pod unschedulable (true/false)
	PodUnschedulable string `json:"podUnschedulable,omitempty"`

	// Pod error message
	PodConditionError string `json:"podConditionError,omitempty"`

	// Failed container error message
	ContainerStatusesMsg string `json:"containerStatusesMsg,omitempty"`

	// Number of containers that are up
	NbOkContainers string `json:"nbOkContainers,omitempty"`

	// Number of total containers in the pod
	NbTotalContainers string `json:"nbTotalContainers,omitempty"`

	// Number of container failures leading to pod restarts
	NbPodRestart string `json:"nbPodRestart,omitempty"`

	// State that is mapping the kubernetes api state
	LogicalState string `json:"logicalState,omitempty"`

	// Pod creation time
	StartTime string `json:"startTime,omitempty"`
}

type PodsStatus

type PodsStatus struct {
	PodStatus []PodStatus `json:"podStatus,omitempty"`
}

List of all pods status

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

type Sandbox

type Sandbox struct {
	Releases  map[string]bool
	StartTime time.Time
	Running   bool
}

type UserData

type UserData struct {
	AllPodsStatus PodsStatus
	ExpectedPods  map[string]*PodStatus
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL