github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/admin/utils_test.go (about)

     1  package admin_test
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/pyroscope-io/pyroscope/pkg/admin"
     7  )
     8  
     9  func createHttpClientWithFastTimeout(socketAddr string) admin.HTTPClient {
    10  	fastTimeout := admin.WithTimeout(time.Millisecond * 10)
    11  	http, err := admin.NewHTTPOverUDSClient(socketAddr, fastTimeout)
    12  	if err != nil {
    13  		panic(err)
    14  	}
    15  	return http
    16  }