Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

This SDK is used to develop the WASM Plugins of MSE Gateway

License

Notifications You must be signed in to change notification settings

mse-group/wasm-extensions-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

This SDK is used to develop the WASM Plugins of MSE Gateway (powered by envoy).

Requirements

(need support Go's type parameters)

Go version: >= 1.18

TinyGo version: >= 0.25.0

Quick Examples

wasm plugin config

# this config will take effect globally (all incoming requests are affected)
block_urls:
- "test"
_rules_:
# matching by route name takes effect
- _match_route_:
  - route-a
  - route-b
  block_bodys:
  - "hello world"
# matching by domain takes effect
- _match_domain_:
  - "*.example.com"
  - test.com
  block_urls:
  - "swagger.html"
  block_bodys:
  - "hello world"

code

request-block

compile to wasm

tinygo build -o main.wasm -scheduler=none -target=wasi ./main.go

About

This SDK is used to develop the WASM Plugins of MSE Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages