go

module
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0

README

The (Tiny)Go SDK for Spin

This package contains an SDK that facilitates building Spin components in (Tiny)Go. It allows building HTTP components that target the Spin executor.

import (
	"fmt"
	spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
)

func init() {
    // call the Handle function
    spinhttp.Handle(func(w http.ResponseWriter, r *http.Request) {
        fmt.Fprintln(w, "Hello, Fermyon!")
    })
}

func main() {}

Directories

Path Synopsis
Package http contains the helper functions for writing Spin HTTP components in TinyGo, as well as for sending outbound HTTP requests.
Package http contains the helper functions for writing Spin HTTP components in TinyGo, as well as for sending outbound HTTP requests.
internal
db
Package kv provides access to key value stores within Spin components.
Package kv provides access to key value stores within Spin components.
Package llm provides the interface to use Large Language Models in Spin.
Package llm provides the interface to use Large Language Models in Spin.
Package redis provides the handler function for the Redis trigger, as well as access to Redis within Spin components.
Package redis provides the handler function for the Redis trigger, as well as access to Redis within Spin components.
Package sqlite provides an interface to sqlite database stores within Spin components.
Package sqlite provides an interface to sqlite database stores within Spin components.

Jump to

Keyboard shortcuts

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