Documentation
¶
Overview ¶
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exec ¶
type Exec struct {
// Code is the function code, either as readable text or base64 encoded (for .zip and .jar archives)
Code string
// Main is the function's entry point (aka main function), by default "main"
Main string
// Image is the function's docker image
Image string
// Language is the function's runtime language
Language string
}
type FaaSDriver ¶
type FaaSDriver interface {
// Create creates (or updates, if is already exists) the function in the FaaS implementation.
// name is the name of the function.
// exec defines the function implementation.
Create(f *Function, exec *Exec) error
// Delete deletes the function in the FaaS implementation.
// name is the name of the function.
Delete(f *Function) error
// GetRunnable returns a callable representation of a function.
// name is the name of the function.
GetRunnable(e *FunctionExecution) Runnable
}
type FnRun ¶
type FnRun struct {
entitystore.BaseEntity
FunctionName string `json:"functionName"`
FunctionID string `json:"functionID"`
Blocking bool `json:"blocking"`
Input interface{} `json:"input,omitempty"`
Output interface{} `json:"output,omitempty"`
Secrets []string `json:"secrets,omitempty"`
Logs []string `json:"logs,omitempty"`
FinishedTime time.Time `json:"finishedTime,omitempty"`
WaitChan chan struct{} `json:"-"`
}
FnRun struct represents single function run
type Function ¶
type Function struct {
entitystore.BaseEntity
Code string `json:"code"`
Main string `json:"main"`
ImageName string `json:"image"`
Schema *Schema `json:"schema,omitempty"`
Secrets []string `json:"secrets,omitempty"`
}
Function struct represents function entity that is stored in entity store
type FunctionError ¶
type FunctionError interface {
AsFunctionErrorObject() interface{}
}
type FunctionExecution ¶
type Middleware ¶
type Runner ¶
type Runner interface {
Run(fn *FunctionExecution, in interface{}) (interface{}, error)
}
type Schema ¶
type Schema struct {
In *spec.Schema `json:"in,omitempty"`
Out *spec.Schema `json:"out,omitempty"`
}
Schema struct stores input and output validation schemas
type Schemas ¶
type Schemas struct {
// SchemaIn is the function input validation schema data structure. Can be nil.
SchemaIn interface{}
// SchemaOut is the function output validation schema data structure. Can be nil.
SchemaOut interface{}
}
type SecretInjector ¶
type SecretInjector interface {
GetMiddleware(secrets []string, cookie string) Middleware
}
type Validator ¶
type Validator interface {
GetMiddleware(schemas *Schemas) Middleware
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 |
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc.
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. |
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc.
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. |
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc.
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. |
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc.
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. |
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc.
|
///////////////////////////////////////////////////////////////////// Copyright (c) 2017 VMware, Inc. |