Documentation ¶
Overview ¶
Package scale implements the Scale Runtime in Go.
Index ¶
- Variables
- type Config
- func (c *Config[T]) WithContext(ctx context.Context) *Config[T]
- func (c *Config[T]) WithExtension(e extension.Extension) *Config[T]
- func (c *Config[T]) WithFunction(function *scalefunc.V1BetaSchema, env ...map[string]string) *Config[T]
- func (c *Config[T]) WithFunctions(function []*scalefunc.V1BetaSchema, env ...map[string]string) *Config[T]
- func (c *Config[T]) WithRawOutput(rawOutput bool) *Config[T]
- func (c *Config[T]) WithSignature(newSignature interfaces.New[T]) *Config[T]
- func (c *Config[T]) WithStderr(w io.Writer) *Config[T]
- func (c *Config[T]) WithStdout(w io.Writer) *Config[T]
- type Instance
- type Next
- type Parsed
- type Scale
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config[T interfaces.Signature] struct { // contains filtered or unexported fields }
Config is the configuration for a Scale Runtime
func NewConfig ¶
func NewConfig[T interfaces.Signature](newSignature interfaces.New[T]) *Config[T]
NewConfig returns a new Scale Runtime Config
func (*Config[T]) WithExtension ¶ added in v0.4.6
func (*Config[T]) WithFunction ¶
func (*Config[T]) WithFunctions ¶
func (*Config[T]) WithRawOutput ¶
func (*Config[T]) WithSignature ¶
func (c *Config[T]) WithSignature(newSignature interfaces.New[T]) *Config[T]
type Instance ¶
type Instance[T interfaces.Signature] struct { // contains filtered or unexported fields }
Instance is a single instance of a Scale Function chain
type Next ¶
type Next[T interfaces.Signature] func(ctx T) (T, error)
Next is the next function in the middleware chain. It's meant to be implemented by whatever adapter is being used.
type Scale ¶
type Scale[T interfaces.Signature] struct { TraceDataCallback func(data string) // contains filtered or unexported fields }
Scale is the Scale Runtime. It is responsible for initializing and managing the WASM runtime as well as the scale function chain.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
compile
|
|
go
|
|
compile
Module
|
|
Package integration holds integration tests for Scale
|
Package integration holds integration tests for Scale |
Package scalefile implements the ScaleFile type, as well as any helper functions for interacting with ScaleFile types
|
Package scalefile implements the ScaleFile type, as well as any helper functions for interacting with ScaleFile types |
Package scalefunc implements the Schema type, as well as any helper functions for interacting with Schema types
|
Package scalefunc implements the Schema type, as well as any helper functions for interacting with Schema types |
Package signature implements the interfaces, types, and utility functions that can be used by Guest and Host implementations of Scale Signatures.
|
Package signature implements the interfaces, types, and utility functions that can be used by Guest and Host implementations of Scale Signatures. |
converter
Package converter generates a polyglot-encoded buffer from a signature schema and a data payload
|
Package converter generates a polyglot-encoded buffer from a signature schema and a data payload |
Package storage is used to store and retrieve built Scale Functions
|
Package storage is used to store and retrieve built Scale Functions |
Click to show internal directories.
Click to hide internal directories.