Skip to content

It aims to provide pea container to control object instances created in procyon application

License

Notifications You must be signed in to change notification settings

procyon-projects/procyon-peas

Repository files navigation

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

About

It aims to provide pea container to control object instances created in procyon application

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages