Documentation ¶
Index ¶
- type API
- func (e *API) CheckAuth(r *http.Request, w http.ResponseWriter) bool
- func (e *API) Commands() *mux.Router
- func (e *API) GetRandomHostPort() uint32
- func (e *API) IncreaseTaskCount(taskID string) string
- func (e *API) V0ComposeKillService(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeKillTask(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposePush(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeRestartService(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeUpdate(w http.ResponseWriter, r *http.Request)
- func (e *API) V0FrameworkReRegister(w http.ResponseWriter, r *http.Request)
- func (e *API) V0FrameworkSuppress(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ShowAllTasks(w http.ResponseWriter, r *http.Request)
- func (e *API) Versions(w http.ResponseWriter, r *http.Request)
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) GetRandomHostPort ¶ added in v0.4.2
GetRandomHostPort Get random hostportnumber
func (*API) IncreaseTaskCount ¶ added in v1.0.0
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