listener

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoPostStop

func DoPostStop(listeners []ApplicationListener)

DoPostStop Trigger the PostStop event

func DoPreApply

func DoPreApply(listeners []ApplicationListener)

DoPreApply Trigger the PreApply event

func DoPreStart

func DoPreStart(listeners []ApplicationListener)

DoPreStart Trigger the PreStart event

func DoPreStop

func DoPreStop(listeners []ApplicationListener)

DoPreStop Trigger the PreStop event

Types

type ApplicationEventListener

type ApplicationEventListener interface {
	ApplicationListener

	// PreApply triggered before mvc starts, Before the project starts.
	// This is where you can provide basic services, such as set beans.
	// Of course, you can also perform logic here that doesn't require obtaining beans.
	PreApply()

	// PreStart The last event before the project starts, dependency injection is all finished and ready to run.
	// You can execute any logic here.
	PreStart()

	// PreStop The event before the application stops can be performed here to close some resources
	PreStop()

	// PostStop Events after the application has stopped can perform other closing operations here
	PostStop()
}

ApplicationEventListener Application event listener

type ApplicationListener

type ApplicationListener interface{}

ApplicationListener Application listener

type ConfigListener

type ConfigListener interface {
	ApplicationListener

	// Read configuration
	Read(v *viper.Viper) error
}

ConfigListener Configuration listener, used to load configuration

Jump to

Keyboard shortcuts

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