This gives you a basic understanding of Procyon Peas Module. It covers components provided by the framework, such as Pea Processors and Initializers.
Note that you need to register pea processors and initializers by using the function core.Register.
It's used to do something after Pea Definition Registry is initialized.
type PeaDefinitionRegistryProcessor interface {
AfterPeaDefinitionRegistryInitialization(registry PeaDefinitionRegistry)
}
It's used to do something after Pea Factory is initialized.
type PeaFactoryProcessor interface {
AfterPeaFactoryInitialization(factory ConfigurablePeaFactory)
}
BeforePeaInitialization, InitializePea and AfterPeaInitialization are invoked respectively.
Pea Processors are used to manipulate the instance while being created. For example, Binding the configuration properties are done by using Pea Processors.
You can look into ConfigurationPropertiesBindingProcessor for more information.
type PeaProcessor interface {
BeforePeaInitialization(peaName string, pea interface{}) (interface{}, error)
AfterPeaInitialization(peaName string, pea interface{}) (interface{}, error)
}
Pea Initializers are used to initialize Pea instances. You can use to initialize your peas. It is invoked while the instance are created.
type PeaInitializer interface {
InitializePea() error
}
Procyon Framework is released under version 2.0 of the Apache License