Categorygithub.com/grokify/fastlywasmly
modulepackage
0.1.3
Repository: https://github.com/grokify/fastlywasmly.git
Documentation: pkg.go.dev

# README

FastlyWasmly

Build Status Go Report Card Docs License

fastlywasmly is a CLI app that will package a Fastly Compute@Edge TOML and WASM file into a Fastly tarball. It can alternately take a bin directly in place of the WASM file to load all the files in the directory and subdirectories.

It builds the tarball filename and internal folder structure using the same same approach as Fastly CLI.

Usage as CLI

Installation

% go install github.com/grokify/fastlywasmly

Usage

Loading with WASM file:

% fastlywasmly -t /path/to/fastly.toml -w /path/to/yourname.wasm

Loading with bin dir (including WASM file):

% fastlywasmly -t /path/to/fastly.toml -b /path/to/bin

Usage as Library

Installation

% go get github.com/grokify/fastlywasmly

Usage

package main

import (
    "fmt"

    "github.com/grokify/fastlywasmly/tarutil"
)

func main() {
    outfile, err := tarutil.BuildEdgePackage(
        "/path/to/fastly.toml",
        "/path/to/anything.wasm or empty if using bindir only",
        "/path/to/option/bin/dir or empty if using wasm only")
    if err != nil {
        panic(err)
    }
    fmt.Printf("WROTE [%s]\n", outfile)
}

# Packages

No description provided by the author