Skip to content

Instantly share code, notes, and snippets.

@Prajwalprakash3722
Created June 15, 2025 07:10
Show Gist options
  • Save Prajwalprakash3722/ac5a9ec708fa7adcb0d3587c70bb7fc5 to your computer and use it in GitHub Desktop.
Save Prajwalprakash3722/ac5a9ec708fa7adcb0d3587c70bb7fc5 to your computer and use it in GitHub Desktop.
package types
// Plugin is the fundamental interface for all extensible components.
type Plugin interface {
// Name provides a unique identifier for the plugin.
Name() string
// Configure applies a given configuration map to the plugin.
Configure(config map[string]interface{}) error
// Init initializes the plugin, like connecting to a database.
Init() error
// Stop provides a mechanism for a graceful shutdown.
Stop() error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment