fn

package
v0.0.0-...-d52247b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FnFlags = []cli.Flag{
	cli.Uint64Flag{
		Name:  "memory,m",
		Usage: "Memory in MiB",
	},
	cli.StringSliceFlag{
		Name:  "config,c",
		Usage: "Function configuration",
	},
	cli.IntFlag{
		Name:  "timeout",
		Usage: "Function timeout (eg. 30)",
	},
	cli.IntFlag{
		Name:  "idle-timeout",
		Usage: "Function idle timeout (eg. 30)",
	},
	cli.StringSliceFlag{
		Name:  "annotation",
		Usage: "Function annotation (can be specified multiple times)",
	},
	cli.StringFlag{
		Name:  "image",
		Usage: "Function image",
	},
}

FnFlags used to create/update functions

Functions

func BashCompleteFns

func BashCompleteFns(c *cli.Context)

BashCompleteFns can be called from a BashComplete function to provide function completion suggestions (Assumes the current context already contains an app name as an argument. This should be confirmed before calling this)

func Create

func Create() cli.Command

Create function command

func CreateFn

func CreateFn(r *fnclient.Fn, appID string, fn *models.Fn) (*models.Fn, error)

CreateFn request

func Delete

func Delete() cli.Command

Delete function command

func GetConfig

func GetConfig() cli.Command

GetConfig for function command

func GetFnByName

func GetFnByName(client *fnclient.Fn, appID, fnName string) (*models.Fn, error)

GetFnByName looks up a fn by name using the given client

func Inspect

func Inspect() cli.Command

Inspect function command

func List

func List() cli.Command

List functions command

func ListConfig

func ListConfig() cli.Command

ListConfig for function command

func PutFn

func PutFn(f *fnclient.Fn, fnID string, fn *models.Fn) error

PutFn updates the fn with the given ID using the content of the provided fn

func SetConfig

func SetConfig() cli.Command

SetConfig for function command

func UnsetConfig

func UnsetConfig() cli.Command

UnsetConfig for function command

func Update

func Update() cli.Command

Update function command

func WithFlags

func WithFlags(c *cli.Context, fn *models.Fn)

WithFlags returns a function with specified flags

func WithFuncFileV20180708

func WithFuncFileV20180708(ff *common.FuncFileV20180708, fn *models.Fn) error

WithFuncFileV20180708 used when creating a function from a funcfile

func WithSlash

func WithSlash(p string) string

WithSlash appends "/" to function path

func WithoutSlash

func WithoutSlash(p string) string

WithoutSlash removes "/" from function path

Types

type NameNotFoundError

type NameNotFoundError struct {
	Name string
}

NameNotFoundError error for app not found when looked up by name

func (NameNotFoundError) Error

func (n NameNotFoundError) Error() string

Jump to

Keyboard shortcuts

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