An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.2% on proxy.golang.org
Top 3.7% dependent packages on proxy.golang.org
Top 3.0% dependent repos on proxy.golang.org
Top 7.7% forks on proxy.golang.org

proxy.golang.org : github.com/logrange/linker

Package linker provides Dependency Injection and Inversion of Control functionality. The core component is Injector, which allows to register Components. Component is an object, which can have any type, which requires some initialization, or can be used for initializing other components. Every component is registered in the Injector by the component name or anonymously (empty name). Same object can be registered by different names. This could be useful if the object implements different interfaces that can be used by different components. The package contains several interfaces: PostConstructor, Initializer and Shutdowner, which could be implemented by components with a purpose to be called by Injector on different initialization/de-initialization phases. Init() function of Injector allows to initialize registered components. The initialization process supposes that components with 'pointer to struct' type or interfaces, which contains a 'pointer to struct' will be initialized. The initialization supposes to inject (assign) the struct fields values using other registered components. Injector matches them by name or by type. Injector uses fail-fast strategy so any error is considered like misconfiguraion and a panic happens. When all components are initialized, the components, which implement PostConstructor interface will be notified via PostConsturct() function call. The order of PostConstruct() calls is not defined. After the construction phase, injector builds dependencies graph with a purpose to detect dependency loops and to establish components initialization order. If a dependency loop is found, Injector will panic. Components, which implement Initializer interface, will be notified in specific order by Init(ctx) function call. Less dependant components will be initialized before the components that have dependency on the first ones. Injector is supposed to be called from one go-routine and doesn't support calls from multiple go-routines. Initialization process could take significant time, so context is provided. If the context is cancelled or closed it will be detected either by appropriate component or by the Injector what will cause of de-intializing already initialized components using Shutdown() function call (if provided) in reverse of the initialization order. Panic will happen then.

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/logrange/linker
Keywords: dependency-injection , injector , ioc-framework , lifecycle
License: Apache-2.0
Latest release: over 5 years ago
First release: over 5 years ago
Namespace: github.com/logrange
Dependent packages: 2
Dependent repositories: 3
Stars: 36 on GitHub
Forks: 6 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago

Top 7.6% on proxy.golang.org
github.com/solarisdb/perftests v0.28.0
28 versions - Latest release: over 1 year ago - 0 stars on GitHub
Top 9.0% on proxy.golang.org
github.com/solarisdb/solaris v0.28.0
29 versions - Latest release: over 1 year ago - 1 stars on GitHub
Top 10.0% on proxy.golang.org
github.com/simila-io/simila v0.104.0
Simila search service
109 versions - Latest release: almost 2 years ago - 6 stars on GitHub
github.com/acquirecloud/golibs v0.3.14
Copyright 2023 The acquirecloud Authors Licensed under the Apache License, Version 2.0 (the "Lic...
17 versions - Latest release: about 2 years ago - 2 dependent packages - 3 stars on GitHub
Top 7.5% on proxy.golang.org
github.com/logrange/range v0.0.0-20210826213509-a65c9b2d9ff3
Persistent storage of streams of records
1 version - Latest release: about 4 years ago - 1 dependent package - 2 dependent repositories - 7 stars on GitHub
Top 5.9% on proxy.golang.org
github.com/logrange/logrange v0.1.48
High performance data aggregating storage
12 versions - Latest release: almost 5 years ago - 1 dependent repositories - 192 stars on GitHub
Past Dependents
Include Past Dependents

Check this option to include packages that no longer depend on this package in their latest version but previously did.