MCPcopy
hub / github.com/uber-go/fx

github.com/uber-go/fx @v1.24.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.24.0 ↗
882 symbols 3,747 edges 142 files 335 documented · 38%
README

:unicorn: Fx GoDoc Github release Build Status Coverage Status Go Report Card

Fx is a dependency injection system for Go.

Benefits

  • Eliminate globals: Fx helps you remove global state from your application. No more init() or global variables. Use Fx-managed singletons.
  • Code reuse: Fx lets teams within your organization build loosely-coupled and well-integrated shareable components.
  • Battle tested: Fx is the backbone of nearly all Go services at Uber.

See our docs to get started and/or learn more about Fx.

Installation

Use Go modules to install Fx in your application.

go get go.uber.org/fx@v1

Getting started

To get started with Fx, start here.

Stability

This library is v1 and follows SemVer strictly.

No breaking changes will be made to exported APIs before v2.0.0.

This project follows the Go Release Policy. Each major version of Go is supported until there are two newer major releases.

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Option (Interface)
An Option specifies the behavior of the application. This is the primary means by which you interface with Fx. Zero or [17 …
app.go
ShutdownOption (Interface)
ShutdownOption provides a way to configure properties of the shutdown process. Currently, no options have been implement [17 …
shutdown.go
Logger (Interface)
This is a partial fxevent package inspired by the real fxevent package, but with a fixed list of events we can test agai [16 …
tools/analysis/passes/allfxevents/testdata/src/go.uber.org/fx/fxevent/fxevent.go
Event (Interface)
Event defines an event emitted by fx. [22 implementers]
fxevent/event.go
Logger (Interface)
Logger defines interface used for logging. [16 implementers]
fxevent/logger.go
StartOption (Interface)
StartOption is an option for the Start function. [17 implementers]
docs/internal/apptest/run.go
LifecycleOption (Interface)
LifecycleOption modifies the behavior of the [Lifecycle] when passed to [NewLifecycle]. [17 implementers]
fxtest/lifecycle.go
Annotation (Interface)
Annotation specifies how to wrap a target for [Annotate]. It can be used to set up additional options for a constructor, [5 …
annotated.go

Core symbols most depended-on inside this repo

Run
called by 335
app.go
Provide
called by 259
provide.go
Annotate
called by 201
annotated.go
Invoke
called by 189
invoke.go
Error
called by 141
app.go
New
called by 131
fxtest/app.go
String
called by 122
module.go
Err
called by 121
app.go

Shape

Method 315
Function 300
Struct 207
Interface 36
TypeAlias 17
FuncType 7

Languages

Go100%

Modules by API surface

app.go74 symbols
annotated.go62 symbols
app_test.go60 symbols
annotated_test.go49 symbols
fxevent/event.go38 symbols
module.go26 symbols
internal/fxclock/clock.go26 symbols
internal/lifecycle/lifecycle.go20 symbols
fxtest/lifecycle.go18 symbols
tools/analysis/passes/allfxevents/analysis.go15 symbols
inout_test.go15 symbols
docs/ex/get-started/07-many-handlers/main.go14 symbols

Dependencies from manifests, versioned

github.com/davecgh/go-spewv1.1.1 · 1×
github.com/pmezard/go-difflibv1.0.0 · 1×
go.uber.org/digv1.19.0 · 1×
go.uber.org/fxv1.19.2 · 1×
go.uber.org/goleakv1.2.0 · 1×
go.uber.org/multierrv1.10.0 · 1×
go.uber.org/zapv1.26.0 · 1×
golang.org/x/modv0.23.0 · 1×
golang.org/x/syncv0.11.0 · 1×
golang.org/x/sysv0.0.0-2022041221124 · 1×
golang.org/x/toolsv0.30.0 · 1×

For agents

$ claude mcp add fx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact