controller

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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 Message added in v0.1.2

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

Message type

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) BroadcastRequest added in v0.1.2

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

BroadcastRequest sends a request to workers

func (*Workers) DeployService added in v0.1.2

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

DeployService process incoming request

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

Jump to

Keyboard shortcuts

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