INNER CODE UNIT · Go

bootstrapPlugins

go-chassis/go-chassis · bootstrap/bootstrap.go:8

var bootstrapPlugins = make([]*PluginItem, 0)

// PluginItem include name and plugin implementation
type PluginItem struct {
	Name   string
	Plugin Plugin
}

// Plugin is a interface which declares Init method
type Plugin interface {
	Init() error
}

// Func The Func type is an adapter to allow the use of ordinary functions as bootstrapPlugin.
type Func func() error

// Init is a method
func (b Func) Init() error {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…