fx

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(components ...Component) *Application

func (*Application) Provide added in v0.0.3

func (app *Application) Provide(components ...fx.Option) *Application

func (*Application) Run

func (app *Application) Run()

type Component added in v0.0.3

type Component interface {
	Provide() fx.Option
}

func Components added in v0.0.3

func Components(c ...Component) Component

type DataSource added in v0.0.3

type DataSource interface {
	Component
	Name(name string) DataSource
	Connect(ctx context.Context) error
	Close(ctx context.Context) error
}

type DataSources added in v0.0.3

type DataSources struct {
	fx.In

	Items []DataSource `group:"data_sources"`
	// contains filtered or unexported fields
}

func (*DataSources) Close added in v0.0.3

func (d *DataSources) Close(ctx context.Context) error

func (*DataSources) Connect added in v0.0.3

func (d *DataSources) Connect(ctx context.Context) error

type Server added in v0.0.3

type Server interface {
	Component
	RegisterService(constructors ...any)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL