dic

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dic

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

Dic dependency injection container

func New

func New() *Dic

New dic constructor

func (*Dic) Build

func (v *Dic) Build() error

Build - initialize dependencies

func (*Dic) Down

func (v *Dic) Down(ctx ctx.Context) error

Down - stop all services in dependencies

func (*Dic) Inject

func (v *Dic) Inject(item interface{}) error

Inject - obtained dependence

func (*Dic) Register

func (v *Dic) Register(items ...interface{}) error

Register - register a new dependency

func (*Dic) Up

func (v *Dic) Up(ctx ctx.Context) error

Up - start all services in dependencies

Jump to

Keyboard shortcuts

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