fastlywasmly

command module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 4 Imported by: 0

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)
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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