func (c *IPAMContext) ServeIntrospection() {
	if disableIntrospection() {
		log.Info("Introspection endpoints disabled")
		return
	}

	server := c.setupIntrospectionServer()
	for {
		_ = retry.RetryWithBackoff(retry.NewSimpleBackoff(time.Second, time.Minute, 0.2, 2), func() error {
			var ln net.Listener
			var err error

			if strings.HasPrefix(server.Addr, "unix:") {
				socket := strings.TrimPrefix(server.Addr, "unix:")
				ln, err = net.Listen("unix", socket)
			} else {
				ln, err = net.Listen("tcp", server.Addr)
			}

			if err == nil {
				err = server.Serve(ln)
			}

			return err
		})
	}
}
// ServeIntrospection sets up ipamd introspection endpoints
ServeIntrospection sets up ipamd introspection endpoints
// ServeIntrospection sets up ipamd introspection endpoints
func (c *IPAMContext) ServeIntrospection() {
	if disableIntrospection() {
		log.Info("Introspection endpoints disabled")
		return
	}
	server := c.setupIntrospectionServer()
	for {
		_ = retry.RetryWithBackoff(retry.NewSimpleBackoff(time.Second, time.Minute, 0.2, 2), func() error {
			var ln net.Listener
			var err error
			if strings.HasPrefix(server.Addr, "unix:") {
				socket := strings.TrimPrefix(server.Addr, "unix:")
				ln, err = net.Listen("unix", socket)
			} else {
				ln, err = net.Listen("tcp", server.Addr)
			}
			if err == nil {
				err = server.Serve(ln)
			}
			return err
		})
	}
}
func ( c * IPAMContext ) ServeIntrospection ( ) { if disableIntrospection ( ) { log . Info ( " " ) return } server := c . setupIntrospectionServer ( ) for { _ = retry . RetryWithBackoff ( retry . NewSimpleBackoff ( time . Second , time . Minute , 0.2 , 2 ) , func ( ) error { var ln net . Listener var err error if strings . HasPrefix ( server . Addr , " " ) { socket := strings . TrimPrefix ( server . Addr , " " ) ln , err = net . Listen ( " " , socket ) } else { ln , err = net . Listen ( " " , server . Addr ) } if err == nil { err = server . Serve ( ln ) } return err } ) } }
ServeIntrospection sets up ipamd introspection endpoints
ServeIntrospection sets up ipamd introspection endpoints