Learn how Scale Signatures work and how they’re used in Scale Functions.
Signature | Description | Supported Languages | Available Adapters | Latest Version |
---|---|---|---|---|
HTTP | HTTP Signature meant to be used for HTTP handlers and middleware. | Go, Rust, TypeScript, JavaScript | net/http, FastHTTP, NextJS | 0.3.8 |
scale signature new
command:
Context
is a Scale Signature that defines a struct with a string and a default string value.
For more information on using this syntax, using HCL format
guest
and host
signatures, each of which are set of functions/interfaces that handle getting the data in, and out, of the associated scale function(s), in a type-safe, and performant manner.
For more information on why we need bindings for the guest and the host, see the overview.
Now, to use a Scale Signature in Golang, using the generated signature above, you can define a function accordingly. Here’s an example:
scale signature use <name:tag>
command. Once this is done, you can use the types defined in your signature file for input and output of your scale function.
All of the commands for working with signatures are in the CLI API reference.
Next()
method which runs the next function in the chain.
Next()
method will not do anything and will return the same context.