api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuth

func CheckAuth(r *http.Request, w http.ResponseWriter) bool

CheckAuth will check if the token is valid

func Commands

func Commands() *mux.Router

Commands is the main function of this package

func DelRedisKey

func DelRedisKey(key string) int64

DelRedisKey will delete a redis key

func ErrorMessage

func ErrorMessage(number int, function string, msg string) []byte

ErrorMessage will create a message json

func GetAllRedisKeys

func GetAllRedisKeys(pattern string) *goredis.ScanIterator

GetAllRedisKeys get out all redis keys to a patter

func GetRedisKey

func GetRedisKey(key string) string

GetRedisKey get out the data of a key

func GetTaskFromEvent

func GetTaskFromEvent(update *mesosproto.Event_Update) mesosutil.Command

GetTaskFromEvent get out the key by a mesos event

func SaveConfig

func SaveConfig() error

SaveConfig store the current framework config

func SetConfig

func SetConfig(cfg *cfg.Config, frm *mesosutil.FrameworkConfig)

SetConfig set the global config

func V0ComposeKillService

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

V0ComposeKillService will kill a task from a service from a specific project example: curl -X DELETE http://user:password@127.0.0.1:10000/v0/compose/{projectname}/{servicename}/{taskid}

func V0ComposeKillTask

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

V0ComposeKillTask will kill a task from a service from a specific project example: curl -X DELETE http://user:password@127.0.0.1:10000/v0/compose/{projectname}/{servicename}/{taskid}

func V0ComposePush

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

V0ComposePush will read and interpret the docker-compose.yml example: curl -X GET http://user:password@127.0.0.1:10000/v0/compose --data-binary @docker-compose.yml

func V0ComposeRestartService

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

V0ComposeRestartService will restart a service from a specific project example: curl -X PUT http://user:password@127.0.0.1:10000/v0/compose/{projectname}/{servicename}/restart

func V0ComposeUpdate

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

V0ComposeUpdate will update the docker-compose.yml example: curl -X GET http://user:password@127.0.0.1:10000/v0/compose --data-binary @docker-compose.yml

func V0ShowAllTasks

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

V0ShowAllTasks will print out all tasks example: curl -X GET http://user:password@127.0.0.1:10000/v0/task/show

Types

This section is empty.

Jump to

Keyboard shortcuts

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