Documentation
¶
Index ¶
- Variables
- func GetVersion(url string, apiKey string) (version string, err error)
- func HealthCheck(url string, apiKey string) (err error)
- func ListFunctionsAndSaveToInteralStates(url string, apiKey string) (err error)
- func RunFunction(ctx *logging.ContextMap, functionName string, ...) (outputs map[string]sharedtypes.FilledInputOutput, err error)
- func StreamFunction(ctx *logging.ContextMap, functionName string, ...) (channel *chan string, err error)
Constants ¶
This section is empty.
Variables ¶
var AvailableCategories map[string]bool
var AvailableFunctions map[string]*sharedtypes.FunctionDefinition
Global variable to store the available functions, types and categories
var AvailableTypes map[string]bool
Functions ¶
func GetVersion ¶ added in v1.0.5
GetVersion retrieves the version of the external function server This function is used to get the version of the external function server
Parameters:
- url: the URL of the external function server
- apiKey: the API key to authenticate with the external function server
Returns:
- version: the version of the external function server
- err: an error message if the gRPC call fails
func HealthCheck ¶ added in v1.0.5
HealthCheck checks the health of the external function server This function is used to check if the external function server is running and reachable
Parameters:
- url: the URL of the external function server
- apiKey: the API key to authenticate with the external function server
Returns:
- err: an error message if the gRPC call fails
func ListFunctionsAndSaveToInteralStates ¶
ListFunctionsAndSaveToInteralStates calls the ListFunctions gRPC and saves the functions to internal states This function is used to get the list of available functions from the external function server and save them to internal states
Parameters:
- url: the URL of the external function server
- apiKey: the API key to authenticate with the external function server
Returns:
- error: an error message if the gRPC call fails
func RunFunction ¶
func RunFunction(ctx *logging.ContextMap, functionName string, inputs map[string]sharedtypes.FilledInputOutput) (outputs map[string]sharedtypes.FilledInputOutput, err error)
RunFunction calls the RunFunction gRPC and returns the outputs This function is used to run an external function
Parameters:
- functionName: the name of the function to run
- inputs: the inputs to the function
Returns:
- map[string]sharedtypes.FilledInputOutput: the outputs of the function
- error: an error message if the gRPC call fails
func StreamFunction ¶
func StreamFunction(ctx *logging.ContextMap, functionName string, inputs map[string]sharedtypes.FilledInputOutput) (channel *chan string, err error)
StreamFunction calls the StreamFunction gRPC and returns a channel to stream the outputs This function is used to stream the outputs of an external function
Parameters:
- functionName: the name of the function to run
- inputs: the inputs to the function
Returns:
- *chan string: a channel to stream the output
- error: an error message if the gRPC call fails
Types ¶
This section is empty.