server

package
v0.0.0-...-576d0f4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var New = func(ip, port, dockerHost string) (*Serve, error) {
	service, err := docker.New(dockerHost)
	if err != nil {
		return &Serve{}, err
	}
	cron, _ := cron.New(dockerHost)
	return &Serve{
		IP:      ip,
		Port:    port,
		Cron:    cron,
		Service: service,
	}, nil
}

Functions

This section is empty.

Types

type Execution

type Execution struct {
	ServiceId string
	CreatedAt time.Time
	Status    swarm.TaskStatus
}

type Response

type Response struct {
	Status  string
	Message string
	Jobs    map[string]cron.JobData
}

type ResponseDetails

type ResponseDetails struct {
	Status     string
	Message    string
	Job        cron.JobData
	Executions []Execution
}

type Serve

type Serve struct {
	IP      string
	Port    string
	Cron    cron.Croner
	Service docker.Servicer
}

func (*Serve) Execute

func (s *Serve) Execute() error

func (*Serve) JobDeleteHandler

func (s *Serve) JobDeleteHandler(w http.ResponseWriter, req *http.Request)

func (*Serve) JobDetailsHandler

func (s *Serve) JobDetailsHandler(w http.ResponseWriter, req *http.Request)

func (*Serve) JobGetHandler

func (s *Serve) JobGetHandler(w http.ResponseWriter, req *http.Request)

func (*Serve) JobPutHandler

func (s *Serve) JobPutHandler(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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