re_configuration

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &app.Component{
	Dependencies: app.Components{
		logger.Component,
		configurator.Component,
	},
	Constructor: func(container container.Container) error {
		return container.Provides(
			NewOsSignal,
			func(osSignal *OsSignal) configurator.ReConfiguration { return osSignal },
		)
	},
	Serve: func(c container.Container) error {
		osSignal, err := container.Get[*OsSignal](c)
		if err != nil {
			return err
		}

		closer, err := container.Get[closer.Closer](c)
		if err != nil {
			return err
		}

		osSignal.Serve(closer.GetContext())

		return nil
	},
}

Functions

This section is empty.

Types

type OsSignal

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

func NewOsSignal

func NewOsSignal(configurator configurator2.Configurator, logger logger.Logger) *OsSignal

func (*OsSignal) Components

func (osSignal *OsSignal) Components() []configurator2.ReConfigurationComponent

func (*OsSignal) Registration

func (osSignal *OsSignal) Registration(components ...configurator2.ReConfigurationComponent)

func (*OsSignal) Serve

func (osSignal *OsSignal) Serve(ctx context.Context)

Jump to

Keyboard shortcuts

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