wrapper

package
v1.18.17 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndRun

func BuildAndRun(name, zipperAddr, credential string, wrapper SFNWrapper, env []string) error

BuildAndRun builds and runs the serverless function.

func ReadTagData

func ReadTagData(r io.Reader) (uint32, []byte, error)

ReadTagData reads tag and data from the socket stream.

func Run

func Run(name, zipperAddr, credential string, wrapper SFNWrapper, env []string) error

Run runs the serverless function.

func WriteTagData

func WriteTagData(w io.Writer, tag uint32, data []byte) error

WriteTagData writes tag and data to the socket stream.

Types

type SFNWrapper

type SFNWrapper interface {
	// WorkDir returns the working directory of the serverless function to build and run.
	WorkDir() string
	// Build defines how to build the serverless function.
	Build(env []string) error
	// Run defines how to run the serverless function.
	Run(env []string) error
}

SFNWrapper defines serverless function wrapper, you can implement this interface to wrap any runtime as a serverless function to run on Yomo.

Jump to

Keyboard shortcuts

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