controller

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteJob added in v0.1.2

func DeleteJob(c *gin.Context)

DeleteJob controller

func DeleteService added in v0.1.1

func DeleteService(c *gin.Context)

DeleteService controller

func GetJob added in v0.1.2

func GetJob(c *gin.Context)

GetJob controller

func GetJobs added in v0.1.2

func GetJobs(c *gin.Context)

GetJobs controller

func GetService added in v0.1.1

func GetService(c *gin.Context)

GetService controller

func GetServices added in v0.1.1

func GetServices(c *gin.Context)

GetServices controller

func Health

func Health(c *gin.Context)

Health controller

func Home

func Home(c *gin.Context)

Home controller

func Metrics

func Metrics() http.Handler

Metrics controller

func Ready

func Ready(c *gin.Context)

Ready controller

Types

type DeployRequest added in v0.1.6

type DeployRequest struct {
	JobID         string            `json:"jobId"`
	ServiceID     string            `json:"serviceId"`
	Template      string            `json:"template"`
	Configs       map[string]string `json:"configs"`
	DeleteAfter   string            `json:"deleteAfter"`
	Type          string            `json:"type"`
	CorrelationID string            `json:"correlationID"`
}

DeployRequest type

func (DeployRequest) GetCorrelation added in v0.1.6

func (d DeployRequest) GetCorrelation() string

GetCorrelation gets the correlation id

func (DeployRequest) GetJob added in v0.1.6

func (d DeployRequest) GetJob() string

GetJob gets the job id

func (DeployRequest) GetService added in v0.1.6

func (d DeployRequest) GetService() string

GetService gets the service id

func (DeployRequest) GetType added in v0.1.6

func (d DeployRequest) GetType() string

GetType gets the job type

type DestroyRequest added in v0.1.6

type DestroyRequest struct {
	JobID         string            `json:"jobId"`
	ServiceID     string            `json:"serviceId"`
	Template      string            `json:"template"`
	Configs       map[string]string `json:"configs"`
	DeleteAfter   string            `json:"deleteAfter"`
	Type          string            `json:"type"`
	CorrelationID string            `json:"correlationID"`
}

DestroyRequest type

func (DestroyRequest) GetCorrelation added in v0.1.6

func (d DestroyRequest) GetCorrelation() string

GetCorrelation gets the correlation id

func (DestroyRequest) GetJob added in v0.1.6

func (d DestroyRequest) GetJob() string

GetJob gets the job id

func (DestroyRequest) GetService added in v0.1.6

func (d DestroyRequest) GetService() string

GetService gets the service id

func (DestroyRequest) GetType added in v0.1.6

func (d DestroyRequest) GetType() string

GetType gets the job type

type Message added in v0.1.2

type Message interface {
	GetCorrelation() string
	GetService() string
	GetJob() string
	GetType() string
}

Message interface

type ServicePayload added in v0.1.1

type ServicePayload struct {
	ID          string            `json:"id"`
	Template    string            `json:"template"`
	Configs     map[string]string `json:"configs"`
	DeleteAfter string            `json:"deleteAfter"`
	CreatedAt   time.Time         `json:"createdAt"`
	UpdatedAt   time.Time         `json:"updatedAt"`
}

ServicePayload type

type Workers added in v0.1.2

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

Workers type

func NewWorkers added in v0.1.2

func NewWorkers() *Workers

NewWorkers get a new workers instance

func (*Workers) DeployRequest added in v0.1.6

func (w *Workers) DeployRequest(c *gin.Context, rawBody []byte)

DeployRequest sends a deploy request to workers

func (*Workers) DestroyRequest added in v0.1.6

func (w *Workers) DestroyRequest(c *gin.Context, rawBody []byte)

DestroyRequest sends a destroy request to workers

func (*Workers) Finalize added in v0.1.2

func (w *Workers) Finalize(notifyChannel <-chan Message)

Finalize finalizes a request

func (*Workers) HandleWorkload added in v0.1.2

func (w *Workers) HandleWorkload() <-chan Message

HandleWorkload handles all incoming requests

func (*Workers) ProcessRequest added in v0.1.6

func (w *Workers) ProcessRequest(notifyChannel chan<- Message, wg *sync.WaitGroup)

ProcessRequest process incoming request

func (*Workers) Watch added in v0.1.6

func (w *Workers) Watch()

Watch watches for a pending jobs

Jump to

Keyboard shortcuts

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