api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.4.0

type API struct {
	Config    *cfg.Config
	Framework *cfg.FrameworkConfig
	Service   cfg.Service
	Compose   cfg.Compose
	Redis     *redis.Redis
	Vault     *vault.Vault
	Mesos     mesos.Mesos
}

API Service include all the current vars and global config

func New added in v0.4.0

func New(cfg *cfg.Config, frm *cfg.FrameworkConfig) *API

New will create a new API object

func (*API) CheckAuth added in v0.4.0

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

CheckAuth will check if the token is valid

func (*API) Commands added in v0.4.0

func (e *API) Commands() *mux.Router

Commands is the main function of this package

func (*API) GetRandomHostPort added in v0.4.2

func (e *API) GetRandomHostPort() uint32

GetRandomHostPort Get random hostportnumber

func (*API) IncreaseTaskCount added in v1.0.0

func (e *API) IncreaseTaskCount(taskID string) string

IncreaseTaskCount split the taskID and increase the app count digit

func (*API) V0ComposeKillService added in v0.4.0

func (e *API) 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/api/compose/v0/{projectname}/{servicename}/{taskid}

func (*API) V0ComposeKillTask added in v0.4.0

func (e *API) 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/api/compose/v0/{projectname}/{servicename}/{taskid}

func (*API) V0ComposePush added in v0.4.0

func (e *API) 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/api/compose/v0 --data-binary @docker-compose.yml

func (*API) V0ComposeRestartService added in v0.4.0

func (e *API) 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/api/compose/v0/{projectname}/{servicename}/restart

func (*API) V0ComposeUpdate added in v0.4.0

func (e *API) 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/api/compose/v0 --data-binary @docker-compose.yml

func (*API) V0FrameworkReRegister added in v1.0.0

func (e *API) V0FrameworkReRegister(w http.ResponseWriter, r *http.Request)

V0FrameworkReRegister will cleanup framework information in redis to force a register in mesos example: curl -X PUT http://user:password@127.0.0.1:10000/api/compose/v0/framework/reregister

func (*API) V0FrameworkSuppress added in v1.0.0

func (e *API) V0FrameworkSuppress(w http.ResponseWriter, r *http.Request)

V0FrameworkSuppress suppress the framework example: curl -X PUT http://user:password@127.0.0.1:10000/api/compose/v0/framework/supress

func (*API) V0ShowAllTasks added in v0.4.0

func (e *API) 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/api/compose/v0/tasks

func (*API) Versions added in v0.4.0

func (e *API) Versions(w http.ResponseWriter, r *http.Request)

Versions give out a list of Versions

Jump to

Keyboard shortcuts

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