v1

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorInternal = iota

	ErrorNotAuthorized
	ErrorNotFound
	ErrorNameExists
	ErrorInvalidArgument
	ErrorNoSpace
	ErrorNotImplmented
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Metadata             `json:"metadata"`
	RunContainerImageUrl string `json:"runContainerImageUrl"`
}

Environment identifies the language and OS specific resources that a function depends on. For now this includes only the function run container image. Later, this will also include build containers, as well as support tools like debuggers, profilers, etc.

type Error

type Error struct {
	Code    errorCode `json:"code"`
	Message string    `json:"message"`
}

Errors returned by the Fission API.

type Function

type Function struct {
	Metadata    `json:"metadata"`
	Environment Metadata `json:"environment"`
	Code        string   `json:"code"`
}

Function is a unit of executable code. Though it's called a function, the code may have more than one function; it's usually some sort of module or package.

type HTTPTrigger

type HTTPTrigger struct {
	Metadata   `json:"metadata"`
	UrlPattern string   `json:"urlpattern"`
	Method     string   `json:"method"`
	Function   Metadata `json:"function"`
}

HTTPTrigger maps URL patterns to functions. Function.UID is optional; if absent, the latest version of the function will automatically be selected.

type MessageQueueTrigger

type MessageQueueTrigger struct {
	Metadata         `json:"metadata"`
	Function         Metadata `json:"function"`
	MessageQueueType string   `json:"messageQueueType"`
	Topic            string   `json:"topic"`
	ResponseTopic    string   `json:"respTopic,omitempty"`
}

type Metadata

type Metadata struct {
	Name string `json:"name"`
	Uid  string `json:"uid,omitempty"`
}

Metadata is used as the general identifier for all kinds of resources managed by the controller.

type TimeTrigger

type TimeTrigger struct {
	Metadata `json:"metadata"`

	Cron string `json:"cron"`

	Function Metadata `json:"function"`
}

TimeTrigger invokes the specific function at a time or times specified by a cron string.

type Watch

type Watch struct {
	Metadata `json:"metadata"`

	Namespace     string `json:"namespace"`
	ObjType       string `json:"objtype"`
	LabelSelector string `json:"labelselector"`
	FieldSelector string `json:"fieldselector"`

	Function Metadata `json:"function"`

	Target string `json:"target"` // Watch publish target (URL, NATS stream, etc)
}

Watch is a specification of Kubernetes watch along with a URL to post events to.

Jump to

Keyboard shortcuts

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