http

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 4

README

waitfor-http

HTTP resource readiness assertion library

Quick start

package main

import (
	"context"
	"fmt"
	"github.com/go-waitfor/waitfor"
	"github.com/go-waitfor/waitfor-http"
	"os"
)

func main() {
	runner := waitfor.New(http.Use())

	err := runner.Test(
		context.Background(),
		[]string{"http://locahost:5432", "https://www.google.com"},
		waitfor.WithAttempts(5),
	)

	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

Documentation

Index

Constants

View Source
const Scheme = "http"

Variables

This section is empty.

Functions

func New

func New(u *url.URL) (waitfor.Resource, error)

func Use

func Use() waitfor.ResourceConfig

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

func (*HTTP) Test

func (h *HTTP) Test(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL