Documentation
¶
Index ¶
- func Drf[T any](p *T) T
- func FirstListenThenServe(srv *http.Server, log *logrus.Logger)
- func GenerateRandomString(length int, cs *string) string
- func GetProjectRoot() (string, error)
- func GetRandomFreePort() string
- func IsPortFree(port string) bool
- func NewRateLimitedHTTPClient(limit rate.Limit, burst int, base http.RoundTripper) *http.Client
- func Ptr[T any](v T) *T
- func RequestWithBackoff(requestFunction func() error) error
- func SetEnvVars(f string) (setEnvVarsErr error)
- type RateLimitedRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstListenThenServe ¶
FirstListenThenServe is a utility function that ensures that first a listener is spin up then the http server is setup for serving asynchronously this is requried to ensure in tests that the server is spinned up before jumping to tests.
func GenerateRandomString ¶
func GetProjectRoot ¶
func GetRandomFreePort ¶
func GetRandomFreePort() string
func IsPortFree ¶
func NewRateLimitedHTTPClient ¶ added in v1.52.0
func RequestWithBackoff ¶
func SetEnvVars ¶
Types ¶
type RateLimitedRoundTripper ¶ added in v1.52.0
type RateLimitedRoundTripper struct {
Base http.RoundTripper
Limiter *rate.Limiter
}
Click to show internal directories.
Click to hide internal directories.