Bootstrap
How to implement
// Initiator methods that need to be implemented
type Initiator interface {
// Start
Start() error
// Stop
Stop()
}
Bootstrap
import "github.com/asjard/asjard/core/bootstrap"
type CustomeBootstrap struct{}
// The following method will be executed after system initialization
func(CustomeBootstrap) Start() error {return nil}
// The following method will be executed after system stop
func(CustomeBootstrap) Stop() {}
func init() {
// Add to startup bootstrap queue
bootstrap.AddBootstrap(&CustomeBootstrap{})
}Initiator
Last updated