Documentation
¶
Overview ¶
Package compute contains commands to manage Compute@Edge packages.
Index ¶
Constants ¶
const ( // RustToolchainVersion is the `rustup` toolchain string for the compiler // that we support RustToolchainVersion = "1.40.0" // WasmWasiTarget is the Rust compilation target for Wasi capable Wasm. WasmWasiTarget = "wasm32-wasi" )
const ManifestFilename = "fastly.toml"
ManifestFilename is the name of the package manifest file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildCommand ¶
BuildCommand produces a deployable artifact from files on the local disk.
func NewBuildCommand ¶
func NewBuildCommand(parent common.Registerer, globals *config.Data) *BuildCommand
NewBuildCommand returns a usable command registered under the parent.
type CargoManifest ¶
type CargoManifest struct {
Package CargoPackage
}
CargoManifest models the package confuiguration properties of a Rust Cargo manifest which we are interested in and are read from the Cargo.toml manifest file within the $PWD of the package.
func (*CargoManifest) Read ¶
func (m *CargoManifest) Read(filename string) error
Read the contents of the Cargo.toml manifest from filename.
type CargoPackage ¶
type CargoPackage struct {
Name string `toml:"name"`
}
CargoPackage models the package confuiguration properties of a Rust Cargo package which we are interested in and is embedded within CargoManifest.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a HTTP client with an endpoint and token to make API requests.
func NewClient ¶
func NewClient(client api.HTTPClient, endpoint, token string) *Client
NewClient constructs a new Client.
func (*Client) UpdatePackage ¶
UpdatePackage is an HTTP API client method to update a package on a given service version. It reads the package from a given path and encodes it as multi-part form data in the request with associated content-type. TODO(ph): This should eventually be replaced by the equivilent method in the go-fastly client.
type DeployCommand ¶
DeployCommand deploys an artifact previously produced by build.
func NewDeployCommand ¶
func NewDeployCommand(parent common.Registerer, client api.HTTPClient, globals *config.Data) *DeployCommand
NewDeployCommand returns a usable command registered under the parent.
type InitCommand ¶
InitCommand initializes a Compute@Edge project package on the local machine.
func NewInitCommand ¶
func NewInitCommand(parent common.Registerer, globals *config.Data) *InitCommand
NewInitCommand returns a usable command registered under the parent.
type RootCommand ¶
RootCommand is the parent command for all subcommands in this package. It should be installed under the primary root command.
func NewRootCommand ¶
func NewRootCommand(parent common.Registerer, globals *config.Data) *RootCommand
NewRootCommand returns a new command registered in the parent.
type Rust ¶
type Rust struct{}
Rust is an implments Toolchain for the Rust lanaguage.
type Toolchain ¶
Toolchain abstracts a Compute@Edge source language toolchain.
func GetToolchain ¶
GetToolchain returns a Toolchain for the provided language.
type UpdateCommand ¶
UpdateCommand calls the Fastly API to update packages.
func NewUpdateCommand ¶
func NewUpdateCommand(parent common.Registerer, client api.HTTPClient, globals *config.Data) *UpdateCommand
NewUpdateCommand returns a usable command registered under the parent.
type ValidateCommand ¶
ValidateCommand validates a package archive.
func NewValidateCommand ¶
func NewValidateCommand(parent common.Registerer, globals *config.Data) *ValidateCommand
NewValidateCommand returns a usable command registered under the parent.