runtimes

package
v0.0.0-...-c4bc982 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	NODEJS_FILE_EXTENSION   = "js"
	SWIFT_FILE_EXTENSION    = "swift"
	PYTHON_FILE_EXTENSION   = "py"
	JAVA_FILE_EXTENSION     = "java"
	JAR_FILE_EXTENSION      = "jar"
	CSHARP_FILE_EXTENSION   = "cs"
	PHP_FILE_EXTENSION      = "php"
	ZIP_FILE_EXTENSION      = "zip"
	RUBY_FILE_EXTENSION     = "rb"
	GO_FILE_EXTENSION       = "go"
	RUST_FILE_EXTENSION     = "rs"
	NODEJS_RUNTIME          = "nodejs"
	SWIFT_RUNTIME           = SWIFT_FILE_EXTENSION
	PYTHON_RUNTIME          = "python"
	JAVA_RUNTIME            = JAVA_FILE_EXTENSION
	DOTNET_RUNTIME          = ZIP_FILE_EXTENSION
	PHP_RUNTIME             = PHP_FILE_EXTENSION
	RUBY_RUNTIME            = "ruby"
	GO_RUNTIME              = GO_FILE_EXTENSION
	RUST_RUNTIME            = "rust"
	HTTP_CONTENT_TYPE_KEY   = "Content-Type"
	HTTP_CONTENT_TYPE_VALUE = "application/json; charset=UTF-8"
	RUNTIME_NOT_SPECIFIED   = "NOT SPECIFIED"
	BLACKBOX                = "blackbox"
	HTTPS                   = "https://"
)

Variables

View Source
var DefaultRunTimes map[string]string
View Source
var FileExtensionRuntimeKindMap map[string]string
View Source
var FileRuntimeExtensionsMap map[string]string
View Source
var SupportedRunTimes map[string][]string

Functions

func CheckExistRuntime

func CheckExistRuntime(rtname string, runtimes map[string][]string) bool

func CheckRuntimeConsistencyWithFileExtension

func CheckRuntimeConsistencyWithFileExtension(ext string, runtime string) bool

func ConvertToMap

func ConvertToMap(op OpenWhiskInfo) (rt map[string][]string)

func DefaultRuntimes

func DefaultRuntimes(op OpenWhiskInfo) (rt map[string]string)

func FileExtensionRuntimes

func FileExtensionRuntimes(op OpenWhiskInfo) (ext map[string]string)

func FileRuntimeExtensions

func FileRuntimeExtensions(op OpenWhiskInfo) (rte map[string]string)

func GetRuntimesByUrl

func GetRuntimesByUrl(opURL string, pop *OpenWhiskInfo) error

func ListOfSupportedRuntimes

func ListOfSupportedRuntimes(runtimes map[string][]string) (rt []string)

Types

type Limit

type Limit struct {
	Apm       uint `json:"actions_per_minute"`
	Tpm       uint `json:"triggers_per_minute"`
	ConAction uint `json:"concurrent_actions"`
}

Structs used to denote the OpenWhisk Runtime information

type OpenWhiskInfo

type OpenWhiskInfo struct {
	Support  SupportInfo          `json:"support"`
	Desc     string               `json:"description"`
	ApiPath  []string             `json:"api_paths"`
	Runtimes map[string][]Runtime `json:"runtimes"`
	Limits   Limit                `json:"limits"`
}

func ParseOpenWhisk

func ParseOpenWhisk(apiHost string) (op OpenWhiskInfo, err error)

We could get the openwhisk info from bluemix through running the command `curl -k https://openwhisk.ng.bluemix.net` hard coding it here in case of network unavailable or failure.

type Runtime

type Runtime struct {
	Deprecated bool   `json:"deprecated"`
	Default    bool   `json:"default"`
	Kind       string `json:"kind"`
}

type SupportInfo

type SupportInfo struct {
	Github string `json:"github"`
	Slack  string `json:"slack"`
}

Jump to

Keyboard shortcuts

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