Files
overlord/Overlord-Client/cmd/agent/plugins/native_entrypoints.go
T

36 lines
964 B
Go
Raw Normal View History

2026-06-28 23:46:56 -05:00
package plugins
type nativeEntryNames struct {
onLoad string
onEvent string
onUnload string
setCallback string
getRuntime string
}
func nativeEntries(manifest PluginManifest) nativeEntryNames {
names := nativeEntryNames{
onLoad: "PluginOnLoad",
onEvent: "PluginOnEvent",
onUnload: "PluginOnUnload",
setCallback: "PluginSetCallback",
getRuntime: "PluginGetRuntime",
}
if manifest.NativeEntrypoints.OnLoad != "" {
names.onLoad = manifest.NativeEntrypoints.OnLoad
}
if manifest.NativeEntrypoints.OnEvent != "" {
names.onEvent = manifest.NativeEntrypoints.OnEvent
}
if manifest.NativeEntrypoints.OnUnload != "" {
names.onUnload = manifest.NativeEntrypoints.OnUnload
}
if manifest.NativeEntrypoints.SetCallback != "" {
names.setCallback = manifest.NativeEntrypoints.SetCallback
}
if manifest.NativeEntrypoints.GetRuntime != "" {
names.getRuntime = manifest.NativeEntrypoints.GetRuntime
}
return names
}