ioc

package module
v0.0.0-...-54d658b Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

IoC

go get -u github.com/rumorshub/ioc

License

Distributed under MIT License, please see license file within the code for more details.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrContainerNotFound = errors.New("container not found in context, call WithContainer")

Functions

func NewCommand

func NewCommand(args []string, short, envPrefix, version string) *cobra.Command

func Run

func Run(ctx context.Context, plugins ...interface{}) error

func WithContainer

func WithContainer(ctx context.Context, container *Container) context.Context

Types

type Config

type Config struct {
	GracePeriod time.Duration
	PrintGraph  bool
}

func NewConfig

func NewConfig(cfg configwise.Configurer, key string) (*Config, error)

NewConfig creates endure container configuration.

type Container

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

func NewContainer

func NewContainer(cfg configwise.Configurer, log logwise.Logger) *Container

func (*Container) Init

func (c *Container) Init() error

func (*Container) RegisterAll

func (c *Container) RegisterAll(plugins ...interface{})

func (*Container) Run

func (c *Container) Run() error

func (*Container) Serve

func (c *Container) Serve() (<-chan *endure.Result, error)

func (*Container) Stop

func (c *Container) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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