service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestPayload

type RequestPayload struct {
	Job         string `json:"job"`
	ServiceName string `json:"serviceName"`
	Target      string `json:"target"`
}

type SController

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

func NewServiceController

func NewServiceController(
	jobs map[string]*config.Job,
	connections *network.Connections,
	cache *cache.Manager,
	logger log.Logger,
) *SController

func (*SController) ServiceAction

func (s *SController) ServiceAction(w http.ResponseWriter, r *http.Request)

CalcExample godoc @Summary Inject service failures @Description Perform start or stop action on a service @Tags Failure injections @Accept json @Produce json @Param action query string true "Specify to perform a start or a stop on the specified service" @Param requestPayload body RequestPayload true "Specify the job name, service name and target" @Success 200 {object} response.Payload @Failure 400 {object} response.Payload @Failure 500 {object} response.Payload @Router /service [post]

Jump to

Keyboard shortcuts

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