handlers

package
v0.0.0-...-2496cb2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandString

func GetRandString(n int) string

GetRandString returns a random string of length N

func RegisterSower

func RegisterSower()

func RegisterSystem

func RegisterSystem()

func StartMonitoringProcess

func StartMonitoringProcess()

Types

type Container

type Container struct {
	Name          string              `json:"name"`
	Image         string              `json:"image"`
	PullPolicy    k8sv1.PullPolicy    `json:"pull_policy"`
	Env           []k8sv1.EnvVar      `json:"env"`
	VolumesMounts []k8sv1.VolumeMount `json:"volumeMounts"`
	Labels        map[string]string   `json:"labels"`
	CPULimit      string              `json:"cpu-limit"`
	MemoryLimit   string              `json:"memory-limit"`
}

Container Struct to hold the configuration for Job Container

type InputRequest

type InputRequest struct {
	Action string                 `json:"action"`
	Input  map[string]interface{} `json:"input"`
	Format string                 `json:"access_format"`
}

InputRequest Struct

type JobInfo

type JobInfo struct {
	UID    string `json:"uid"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

JobInfo is an information about dispatched job

type JobOutput

type JobOutput struct {
	Output string `json:"output"`
}

JobOutput to return job output

func (*JobOutput) JSON

func (t *JobOutput) JSON() ([]byte, error)

type SowerConfig

type SowerConfig struct {
	Name                  string              `json:"name"`
	Action                string              `json:"action"`
	Container             Container           `json:"container"`
	Volumes               []k8sv1.Volume      `json:"volumes"`
	RestartPolicy         k8sv1.RestartPolicy `json:"restart_policy"`
	ServiceAccountName    *string             `json:"serviceAccountName"`
	ActiveDeadlineSeconds *int64              `json:"activeDeadlineSeconds"`
}

SowerConfig Struct to hold all the configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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