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: 0

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