{"id":3523018,"name":"github.com/logrange/linker","ecosystem":"go","description":"Package linker provides Dependency Injection and Inversion of Control functionality.\nThe core component is Injector, which allows to register Components. Component\nis an object, which can have any type, which requires some initialization, or can be used\nfor initializing other components. Every component is registered in the Injector\nby the component name or anonymously (empty name). Same object can be registered\nby different names. This could be useful if the object implements different\ninterfaces that can be used by different components.\n\nThe package contains several interfaces: PostConstructor, Initializer and\nShutdowner, which could be implemented by components with a purpose to be called\nby Injector on different initialization/de-initialization phases.\n\nInit() function of Injector allows to initialize registered components. The\ninitialization process supposes that components with 'pointer to struct' type\nor interfaces, which contains a 'pointer to struct' will be initialized. The\ninitialization supposes to inject (assign) the struct fields values using other\nregistered components. Injector matches them by name or by type. Injector uses\nfail-fast strategy so any error is considered like misconfiguraion and a panic\nhappens.\n\nWhen all components are initialized, the components, which implement PostConstructor\ninterface will be notified via PostConsturct() function call. The order of\nPostConstruct() calls is not defined.\n\nAfter the construction phase, injector builds dependencies graph with a purpose\nto detect dependency loops and to establish components initialization order.\nIf a dependency loop is found, Injector will panic. Components, which implement\nInitializer interface, will be notified in specific order by Init(ctx) function\ncall. Less dependant components will be initialized before the components that\nhave dependency on the first ones.\n\nInjector is supposed to be called from one go-routine and doesn't support calls\nfrom multiple go-routines.\n\nInitialization process could take significant time, so context is provided. If\nthe context is cancelled or closed it will be detected either by appropriate\ncomponent or by the Injector what will cause of de-intializing already initialized\ncomponents using Shutdown() function call (if provided) in reverse of the\ninitialization order. Panic will happen then.","homepage":"https://github.com/logrange/linker","licenses":"Apache-2.0","normalized_licenses":["Apache-2.0"],"repository_url":"https://github.com/logrange/linker","keywords_array":[],"namespace":"github.com/logrange","versions_count":1,"first_release_published_at":"2020-06-25T19:18:00.000Z","latest_release_published_at":"2020-06-25T19:18:00.000Z","latest_release_number":"v0.0.0-20200625191800-a2d82c14f745","last_synced_at":"2026-05-28T19:44:33.749Z","created_at":"2022-04-10T22:22:29.510Z","updated_at":"2026-05-28T19:44:33.750Z","registry_url":"https://pkg.go.dev/github.com/logrange/linker","install_command":"go get github.com/logrange/linker","documentation_url":"https://pkg.go.dev/github.com/logrange/linker#section-documentation","metadata":{},"repo_metadata":{"uuid":"160434102","full_name":"logrange/linker","owner":"logrange","description":"Dependency Injection and Inversion of Control package","archived":false,"fork":false,"pushed_at":"2020-06-25T19:18:10.000Z","size":35,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-02T07:07:36.934Z","etag":null,"topics":["dependency-injection","injector","ioc-framework","lifecycle"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-04T23:56:34.000Z","updated_at":"2022-09-27T08:43:43.000Z","dependencies_parsed_at":"2022-08-30T02:30:38.268Z","dependency_job_id":null,"html_url":"https://github.com/logrange/linker","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logrange%2Flinker","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logrange%2Flinker/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logrange%2Flinker/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logrange","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"}},"repo_metadata_updated_at":"2023-03-21T18:42:21.582Z","dependent_packages_count":2,"downloads":null,"downloads_period":null,"dependent_repos_count":3,"rankings":{"downloads":null,"dependent_repos_count":2.960580782707337,"dependent_packages_count":3.675143442180383,"stargazers_count":6.485750457398439,"forks_count":7.693581380233107,"docker_downloads_count":null,"average":5.203764015629816},"purl":"pkg:golang/github.com/logrange/linker","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/logrange/linker","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/logrange/linker","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/logrange/linker/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-08-09T14:29:42.682Z","issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Flogrange%2Flinker/codemeta","maintainers":[]}