|
networkservice
|
|
Modules | |
| Abstraction | |
| Implementation | |
| Data structure | |
Plugins are a set of components that concretize those "stable" abstractions on which depends the core service. They implement the interfaces managed by the core service (Config, Network, Logger, ...).
For example, when the core service needs to print some debugging logs, it just performs a function call (always the same) which is handled by the logger plugin. This latter can then "decide" to print the logs to the standard output, a log file, a database, etc. depending on what has been been implemented.
This design allows the core service to be extensible without any change in its source code (Open Closed Principle).
1.8.13