network

package
v0.0.0-...-7d78f32 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUp

func IsUp(url string) bool

IsUp checks if a given URL is accessible and returns true if the status code is 2xx

func MonitorStatus

func MonitorStatus(url string, stop <-chan struct{}, status chan<- StatusUpdate)

MonitorStatus continuously monitors the status of a URL and sends updates through a channel

Types

type StatusUpdate

type StatusUpdate struct {
	URL  string
	IsUp bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳