mirror of
				https://github.com/v2fly/v2ray-core.git
				synced 2025-11-03 19:29:22 +00:00 
			
		
		
		
	rename RegisterApp to Register
This commit is contained in:
		
							parent
							
								
									c224f67666
								
							
						
					
					
						commit
						a37819c330
					
				@ -29,7 +29,7 @@ func (this *contextedPacketDispatcher) DispatchToOutbound(destination v2net.Dest
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
	app.Register(APP_ID, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
		packetDispatcher := obj.(packetDispatcherWithContext)
 | 
			
		||||
		return &contextedPacketDispatcher{
 | 
			
		||||
			context:          context,
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ func (this *contextedDnsCache) Add(domain string, ip net.IP) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
	app.Register(APP_ID, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
		dcContext := obj.(dnsCacheWithContext)
 | 
			
		||||
		return &contextedDnsCache{
 | 
			
		||||
			context:  context,
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ func (this *inboundHandlerManagerWithContextImpl) GetHandler(tag string) (proxy.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	app.RegisterApp(APP_ID_INBOUND_MANAGER, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
	app.Register(APP_ID_INBOUND_MANAGER, func(context app.Context, obj interface{}) interface{} {
 | 
			
		||||
		manager := obj.(inboundHandlerManagerWithContext)
 | 
			
		||||
		return &inboundHandlerManagerWithContextImpl{
 | 
			
		||||
			context: context,
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ var (
 | 
			
		||||
	metadataCache = make(map[ID]ForContextCreator)
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func RegisterApp(id ID, creator ForContextCreator) {
 | 
			
		||||
func Register(id ID, creator ForContextCreator) {
 | 
			
		||||
	// TODO: check id
 | 
			
		||||
	metadataCache[id] = creator
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user