controller

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJob added in v0.1.2

func GetJob(c *gin.Context)

GetJob 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 GetTags added in v0.2.1

func GetTags(c *gin.Context)

GetTags controller

func Health

func Health(c *gin.Context)

Health 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"`
	Service       string            `json:"service"`
	Version       string            `json:"version"`
	Configs       map[string]string `json:"configs"`
	DeleteAfter   string            `json:"deleteAfter"`
	Type          string            `json:"type"`
	CorrelationID string            `json:"correlationID"`
}

Message type

type ServicePayload added in v0.1.1

type ServicePayload struct {
	ID          string            `json:"id"`
	Service     string            `json:"service"`
	Configs     map[string]string `json:"configs"`
	DeleteAfter string            `json:"deleteAfter"`
	Version     string            `json:"version"`
	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)

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