Skip to content

xmh19936688/easegress-go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easegress Golang SDK

This is the Golang SDK for Easegress, it can be used to extend the ability of Easegress.

Prerequisites

The following assumes that a recent version of Golang and compiler TinyGo are installed.

Local Development

  1. Make a new directory and initialize a new module:
go mod init demo
  1. Init a go file:
echo '
package main

import (
	"github.com/xmh19936688/easegress-go-sdk/easegress"
)

func init() {
	easegress.Log(easegress.Info, "hello sdk")
}

func main() {
	// keep empty
}
' > main.go
  1. Install the dependency:
go mod tidy
  1. Compile:
tinygo build -o demo.wasm -target wasi .

If everything is right, demo.wasm will be generated.

Deploy and execute

Please refer the documentation of WasmHost for deploying and executing the compiled Wasm code.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages