utils

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExposeLogger = log.New(os.Stdout, "[EXPOSED-SERVICE] ", log.Flags())

Custom logger

Functions

func AddYunikornQueue added in v2.3.0

func AddYunikornQueue(cfg *types.Config, kubeClientset kubernetes.Interface, svc *types.Service) error

AddYunikornQueue Add (or update) a service's queue to Yunikorn's config

func CreateExpose added in v2.7.0

func CreateExpose(expose Expose, kubeClientset kubernetes.Interface, cfg types.Config) error

/ Main function that creates all the kubernetes components

func DeleteExpose added in v2.7.0

func DeleteExpose(expose Expose, kubeClientset kubernetes.Interface) error

/Main function that deletes all the kubernetes components

func DeleteYunikornQueue added in v2.3.0

func DeleteYunikornQueue(cfg *types.Config, kubeClientset kubernetes.Interface, svc *types.Service) error

DeleteYunikornQueue delete a service's queue in Yunikorn's config

func GenerateToken added in v2.2.0

func GenerateToken() string

GenerateToken generates a random hexadecimal token

func ListExpose added in v2.7.0

func ListExpose(expose Expose, kubeClientset kubernetes.Interface) error

/Main function that list all the kubernetes components This function is not used, in the future could be usefull

func UpdateExpose added in v2.7.0

func UpdateExpose(expose Expose, kubeClientset kubernetes.Interface, cfg types.Config) error

/Main function that updates all the kubernetes components

func ValidateService added in v2.7.1

func ValidateService(serv types.Service) types.Service

Validate the input variables of the service Change the values if it is necesary

Types

type Expose added in v2.7.0

type Expose struct {
	Name         string ` binding:"required"`
	NameSpace    string ` binding:"required"`
	Image        string ` `
	Variables    map[string]string
	MaxScale     int32 `default:"10"`
	MinScale     int32 `default:"1"`
	Port         int   ` binding:"required" default:"80"`
	CpuThreshold int32 `default:"80"`
	EnableSGX    bool
}

type MinIOAdminClient

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

MinIOAdminClient struct to represent a MinIO Admin client to configure webhook notifications

func MakeMinIOAdminClient

func MakeMinIOAdminClient(cfg *types.Config) (*MinIOAdminClient, error)

MakeMinIOAdminClient creates a new MinIO Admin client to configure webhook notifications

func (*MinIOAdminClient) RegisterWebhook

func (minIOAdminClient *MinIOAdminClient) RegisterWebhook(name string, token string) error

RegisterWebhook registers a new webhook in the MinIO configuration

func (*MinIOAdminClient) RemoveWebhook

func (minIOAdminClient *MinIOAdminClient) RemoveWebhook(name string) error

RemoveWebhook removes an existent webhook in the MinIO configuration

func (*MinIOAdminClient) RestartServer

func (minIOAdminClient *MinIOAdminClient) RestartServer() error

RestartServer restarts a MinIO server to apply the configuration changes

type OpenfaasScaler added in v2.1.0

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

OpenfaasScaler struct to store the parameters required to scale OpenFaaS functions

func NewOFScaler added in v2.1.0

func NewOFScaler(kubeClientset kubernetes.Interface, cfg *types.Config) *OpenfaasScaler

NewOFScaler returns a pointer to a new OpenfaasScaler struct

func (*OpenfaasScaler) Start added in v2.1.0

func (ofs *OpenfaasScaler) Start()

Start starts the OpenFaaS scaler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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