34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
|
|
// Code generated by ndpgen. DO NOT EDIT.
|
||
|
|
//
|
||
|
|
// This file provides stub implementations for non-WASM platforms.
|
||
|
|
// It allows Go plugins to compile and run tests outside of WASM,
|
||
|
|
// but the actual functionality is only available in WASM builds.
|
||
|
|
//
|
||
|
|
//go:build !wasip1
|
||
|
|
|
||
|
|
package lifecycle
|
||
|
|
|
||
|
|
// Lifecycle is the marker interface for lifecycle plugins.
|
||
|
|
// Implement one or more of the provider interfaces below.
|
||
|
|
// Lifecycle provides plugin lifecycle hooks.
|
||
|
|
// This capability allows plugins to perform initialization when loaded,
|
||
|
|
// such as establishing connections, starting background processes, or
|
||
|
|
// validating configuration.
|
||
|
|
//
|
||
|
|
// The OnInit function is called once when the plugin is loaded, and is NOT
|
||
|
|
// called when the plugin is hot-reloaded. Plugins should not assume this
|
||
|
|
// function will be called on every startup.
|
||
|
|
type Lifecycle interface{}
|
||
|
|
|
||
|
|
// InitProvider provides the OnInit function.
|
||
|
|
type InitProvider interface {
|
||
|
|
OnInit() error
|
||
|
|
}
|
||
|
|
|
||
|
|
// NotImplementedCode is the standard return code for unimplemented functions.
|
||
|
|
const NotImplementedCode int32 = -2
|
||
|
|
|
||
|
|
// Register is a no-op on non-WASM platforms.
|
||
|
|
// This stub allows code to compile outside of WASM.
|
||
|
|
func Register(_ Lifecycle) {}
|