mirror of
				https://source.quilibrium.com/quilibrium/ceremonyclient.git
				synced 2025-11-04 07:07:26 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			400 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			400 B
		
	
	
	
		
			Go
		
	
	
	
	
	
//go:build cgo && !nowatchdog
 | 
						|
 | 
						|
package connmgr
 | 
						|
 | 
						|
import "github.com/raulk/go-watchdog"
 | 
						|
 | 
						|
func registerWatchdog(cb func()) (unregister func()) {
 | 
						|
	return watchdog.RegisterPostGCNotifee(cb)
 | 
						|
}
 | 
						|
 | 
						|
// WithEmergencyTrim is an option to enable trimming connections on memory emergency.
 | 
						|
func WithEmergencyTrim(enable bool) Option {
 | 
						|
	return func(cfg *config) error {
 | 
						|
		cfg.emergencyTrim = enable
 | 
						|
		return nil
 | 
						|
	}
 | 
						|
}
 |