templateHandler

package module
v0.0.0-...-cc2015d Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PACKAGE_DEFINITION string = `package main
`
	CONFIG_CONTROLLER_FILE string = "config.go"
	ZIP_ARCHIVE_PATH       string = "%v/%v.zip"
	CONSTANTS              string = `const (
		ALGORITHM_TYPE string = "%v"
		KUBE_MAIN_IP string = "%v"
)
`
	VARIABLES string = `var (
		functionList = [...]string{"%v"}
		profiledExecutionTimes = [...]int64{%v}
)
`
)
View Source
const (
	OPENWHISK_CONTROLLER_TEMPLATE string = "/tmp/controller/openwhisk/"
	OPENFAAS_CONTROLLER_TEMPLATE  string = "/tmp/controller/openfaas/"
	GO_RUNTIME                    string = "go:1.15"
)

Variables

This section is empty.

Functions

func NewFileZiper

func NewFileZiper(dstFolder, baseFolder string) *fileZiper

Types

type Template

type Template struct {
	Sequence *sq.Sequence
	Client   *whisk.Client
	Location string
}

func NewTemplate

func NewTemplate(sequence *sq.Sequence, client *whisk.Client) *Template

Creates a new Template struct.

func (*Template) Create

func (tpl *Template) Create() error

Copies controller template and creates a zip folder <sequenceName>.zip.

func (*Template) Delete

func (tpl *Template) Delete() error

Deletes template.

func (*Template) Deploy

func (tpl *Template) Deploy() error

Uses zip archive created from Create() method and deployes it to openwhisk client.

type TemplateInterface

type TemplateInterface interface {
	Create() error
	Deploy() error
	Delete() error
}

Jump to

Keyboard shortcuts

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