fn

package
v0.0.0-...-394dbd4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 20 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.StringSliceFlag{
		Name:  "tag",
		Usage: "Freeform tag in key=value form (can be specified multiple times)",
	},
	cli.StringSliceFlag{
		Name:  "defined-tag",
		Usage: "Defined tag in namespace.key=value form (can be specified multiple times)",
	},
	cli.StringFlag{
		Name:  "image",
		Usage: "Function image",
	},
	cli.StringFlag{
		Name:  "pbf",
		Usage: "Create the function from a Pre-Built Function listing OCID",
	},
	cli.StringFlag{
		Name:  "provisioned-concurrency",
		Usage: "Set OCI provisioned concurrency using 'none' or 'constant:<count>'",
	},
	cli.StringFlag{
		Name:  "detached-timeout",
		Usage: "Set OCI detached mode timeout using a duration like 20m or 1h",
	},
	cli.StringFlag{
		Name:  "on-success",
		Usage: "Set OCI detached success destination using <stream|queue|notifications>:<ocid>",
	},
	cli.StringFlag{
		Name:  "on-failure",
		Usage: "Set OCI detached failure destination using <stream|queue|notifications>:<ocid>",
	},
}

FnFlags used to create/update functions

Functions

func ApplyGeneratedOCIParityFnFlags

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

func ApplyGeneratedOCIParityFnListParams

func ApplyGeneratedOCIParityFnListParams(c *cli.Context, params *apifns.ListFnsParams)

func ApplyProvisionedConcurrency

func ApplyProvisionedConcurrency(p provider.Provider, fnID string, cfg *common.OCIProvisionedConcurrencyConfig) error

ApplyProvisionedConcurrency applies OCI provisioned concurrency to a function when the active provider is Oracle.

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 CreateFnWithControl

func CreateFnWithControl(r *fnclient.Fn, appID string, fn *models.Fn, control common.OCIRequestControl) (*models.Fn, error)

func Delete

func Delete() cli.Command

Delete function command

func GeneratedOCIParityCreateUpdateFnFlags

func GeneratedOCIParityCreateUpdateFnFlags() []cli.Flag

func GeneratedOCIParityListFnFlags

func GeneratedOCIParityListFnFlags() []cli.Flag

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 PutFnWithControl

func PutFnWithControl(f *fnclient.Fn, fnID string, fn *models.Fn, control common.OCIRequestControl) error

func ResolvePBFMemoryForListing

func ResolvePBFMemoryForListing(p provider.Provider, fn *models.Fn, listingID string) error

ResolvePBFMemoryForListing auto-selects or validates memory for a PBF-backed function.

func SetClearDestinationAnnotations

func SetClearDestinationAnnotations(fn *models.Fn, clearSuccess, clearFailure bool)

func SetConfig

func SetConfig() cli.Command

SetConfig for function command

func SetDestinationAnnotations

func SetDestinationAnnotations(fn *models.Fn, onSuccess, onFailure *common.OCIDestination)

func SetDetachedTimeoutAnnotation

func SetDetachedTimeoutAnnotation(fn *models.Fn, seconds int)

func SetProvisionedConcurrencyAnnotations

func SetProvisionedConcurrencyAnnotations(fn *models.Fn, cfg *common.OCIProvisionedConcurrencyConfig) error

SetProvisionedConcurrencyAnnotations adds the internal annotations used to carry provisioned concurrency through the create payload into the OCI shim.

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