Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Add option to create HTTP check with IPV6 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

duffn
Copy link

@duffn duffn commented Oct 6, 2021

This adds the ability to create an HTTP check with the IPV6 option checked. This also fixes ip6 -> ipv6 in the CheckResponse struct.

package main

import (
	"fmt"

	"github.com/russellcardullo/go-pingdom/pingdom"
)

func main() {
	client, _ := pingdom.NewClientWithConfig(pingdom.ClientConfig{
		APIToken: "token",
	})

	newCheck := pingdom.HttpCheck{Name: "Test Check", Hostname: "www.google.com", Resolution: 5}
	check, _ := client.Checks.Create(&newCheck)
	fmt.Printf("%+v\n", check)

	ipv6 := true
	newCheck2 := pingdom.HttpCheck{Name: "Test Check 2", Hostname: "www.google.com", Resolution: 5, IPV6: &ipv6}
	check2, _ := client.Checks.Create(&newCheck2)
	fmt.Printf("%+v\n", check2)
}

Screen Shot 2021-10-06 at 2 08 05 PM

Screen Shot 2021-10-06 at 2 08 36 PM

Closes #69

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ipv6 option when creating a check
1 participant