server

package
v0.0.0-...-7107d2d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	Ver          string
	VerSdkFabric string
}

AppInfo is a struct with app info

type LivenessMng

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

LivenessMng is a manager of robots liveness

func StartServer

func StartServer(ctx context.Context, serverPort uint,
	appInfo *AppInfo, robots []string, metricsH http.Handler,
) (*LivenessMng, func(), error)

StartServer starts http server with app info, metrics, liveness and readiness handlers

func (*LivenessMng) SetRobotState

func (lm *LivenessMng) SetRobotState(chName string, state RobotState)

SetRobotState sets state of robot

type RobotState

type RobotState string

RobotState is a state of robot

const (

	// RobotStarted is a state of robot when it is started
	RobotStarted RobotState = "started"
	// RobotStopped is a state of robot when it is stopped
	RobotStopped RobotState = "stopped"
	// RobotStoppedWithErr is a state of robot when it is stopped with error
	RobotStoppedWithErr RobotState = "stoppedWithErr"
)

Jump to

Keyboard shortcuts

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