Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm extension #1204

Merged
merged 10 commits into from
Dec 8, 2024
Merged

wasm extension #1204

merged 10 commits into from
Dec 8, 2024

Conversation

xuleiming
Copy link
Collaborator

Implement the Proxy-Wasm interface (https://github.com/proxy-wasm).
Can dynamically load and call wasm plugins following the Proxy-Wasm spec (https://github.com/proxy-wasm/spec).

xuleiming added 6 commits December 3, 2024 12:26
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
return nil
}

type PluginConfFile struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该切分为独立的文件

return nil
}

type PluginTable struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该切分为独立的文件

bfe_modules/mod_wasmplug/conf_mod_wasmplug.go Outdated Show resolved Hide resolved
bfe_modules/mod_wasmplug/conf_mod_wasmplug.go Outdated Show resolved Hide resolved
bfe_modules/mod_wasmplug/conf_mod_wasmplug.go Outdated Show resolved Hide resolved
bfe_wasmplug/adapter.go Outdated Show resolved Hide resolved
return nil, ErrEngineNotFound
}

// load wasm bytes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 124 - 155,单独切分一个函数吧

GetRootContextID() int32
}

type wasmPluginImpl struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasmPluginImpl切分为独立文件

}

if num < w.InstanceNum() {
w.lock.Lock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 189 - 199,切分为独立函数

newInstance = append(newInstance, instance)
}

w.lock.Lock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 229 - 234,切分为独立函数

xuleiming added 3 commits December 4, 2024 10:35
Signed-off-by: xuleiming <[email protected]>
Signed-off-by: xuleiming <[email protected]>
@mileszhang2016 mileszhang2016 merged commit 67c85e4 into bfenetworks:develop Dec 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants