funcspec

package
v0.0.0-...-dcdb2a0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func

func Func(s *pb.FuncSpec, cb interface{}, args ...argmapper.Arg) *argmapper.Func

Func takes a FuncSpec and returns a *mapper.Func that can be called to invoke this function. The callback can have an argument type of Args in order to get access to the required dynamic proto.Any types of the FuncSpec.

func Spec

func Spec(fn interface{}, args ...argmapper.Arg) (*pb.FuncSpec, error)

Spec takes a function pointer and generates a FuncSpec from it. The function must only take arguments that are proto.Message implementations or have a chain of converters that directly convert to a proto.Message.

Types

type Args

type Args []*pb.FuncSpec_Value

Args is a type that will be populated with all the expected args of the FuncSpec. This can be used in the callback (cb) to Func.

Jump to

Keyboard shortcuts

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