function

package
v1.0.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Root = bootstrap.Root + ".function"
)

Variables

This section is empty.

Functions

func Default

func Default() string

Default returns the default cmd name from config.

func Run

func Run(fn interface{}, c ...CmdFunc) error

Run executes commands with injected fx modules. Valid fn signatures are: * func() * func() error * func(context.Context) * func(context.Context) protocol.Result * func(event.Event) * func(event.Event) protocol.Result * func(context.Context, event.Event) * func(context.Context, event.Event) protocol.Result * func(event.Event) *event.Event * func(event.Event) (*event.Event, protocol.Result) * func(context.Context, event.Event) *event.Event * func(context.Context, event.Event) (*event.Event, protocol.Result)

Types

type CmdFunc

type CmdFunc func(fn interface{}) *co.Command

CmdFunc defines a function that return a command. Valid fn signatures are: * func() * func() error * func(context.Context) * func(context.Context) protocol.Result * func(event.Event) * func(event.Event) protocol.Result * func(context.Context, event.Event) * func(context.Context, event.Event) protocol.Result * func(event.Event) *event.Event * func(event.Event) (*event.Event, protocol.Result) * func(context.Context, event.Event) *event.Event * func(context.Context, event.Event) (*event.Event, protocol.Result)

Directories

Path Synopsis
adapter

Jump to

Keyboard shortcuts

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