mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			936 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			936 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package application
 | 
						|
 | 
						|
import (
 | 
						|
	"mayfly-go/pkg/ioc"
 | 
						|
)
 | 
						|
 | 
						|
func InitIoc() {
 | 
						|
	ioc.Register(new(machineAppImpl), ioc.WithComponentName("MachineApp"))
 | 
						|
	ioc.Register(new(machineFileAppImpl), ioc.WithComponentName("MachineFileApp"))
 | 
						|
	ioc.Register(new(machineScriptAppImpl), ioc.WithComponentName("MachineScriptApp"))
 | 
						|
	ioc.Register(new(machineCronJobAppImpl), ioc.WithComponentName("MachineCronJobApp"))
 | 
						|
	ioc.Register(new(machineTermOpAppImpl), ioc.WithComponentName("MachineTermOpApp"))
 | 
						|
}
 | 
						|
 | 
						|
func GetMachineApp() Machine {
 | 
						|
	return ioc.Get[Machine]("MachineApp")
 | 
						|
}
 | 
						|
 | 
						|
func GetMachineFileApp() MachineFile {
 | 
						|
	return ioc.Get[MachineFile]("MachineFileApp")
 | 
						|
}
 | 
						|
 | 
						|
func GetMachineScriptApp() MachineScript {
 | 
						|
	return ioc.Get[MachineScript]("MachineScriptApp")
 | 
						|
}
 | 
						|
 | 
						|
func GetMachineCronJobApp() MachineCronJob {
 | 
						|
	return ioc.Get[MachineCronJob]("MachineCronJobApp")
 | 
						|
}
 | 
						|
 | 
						|
func GetMachineTermOpApp() MachineTermOp {
 | 
						|
	return ioc.Get[MachineTermOp]("MachineTermOpApp")
 | 
						|
}
 |