Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 2.48 KB

README.md

File metadata and controls

57 lines (46 loc) · 2.48 KB

Procyon Peas

Go Report Card codecov Build Status Gitter PkgGoDev

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.

Pea Definition Registry Processor

It's used to do something after Pea Definition Registry is initialized.

type PeaDefinitionRegistryProcessor interface {
	AfterPeaDefinitionRegistryInitialization(registry PeaDefinitionRegistry)
}

Pea Factory Processor

It's used to do something after Pea Factory is initialized.

type PeaFactoryProcessor interface {
	AfterPeaFactoryInitialization(factory ConfigurablePeaFactory)
}

Pea Processors and Initializers

BeforePeaInitialization, InitializePea and AfterPeaInitialization are invoked respectively.

Processor

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)
}

Initializer

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
}

License

Procyon Framework is released under version 2.0 of the Apache License