stoppropaganda

package
v0.0.59 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const VALIDATE_DNS_EVERY = 5 * time.Minute

Variables

This section is empty.

Functions

func Start

func Start()

Types

type DNSTarget added in v0.0.36

type DNSTarget struct {
	Status DNSTargetStatus
	// contains filtered or unexported fields
}

type DNSTargetStatus added in v0.0.36

type DNSTargetStatus struct {
	Requests     uint   `json:"requests"`
	Success      uint   `json:"success"`
	Errors       uint   `json:"errors"`
	LastErrorMsg string `json:"last_error_msg"`
}

type DownloadedStat added in v0.0.37

type DownloadedStat struct {
	Endpoint   string
	Downloaded uint64
}

func (*DownloadedStat) FormatMegabytes added in v0.0.37

func (ds *DownloadedStat) FormatMegabytes() string

type DownloadedStats added in v0.0.37

type DownloadedStats []*DownloadedStat

func (DownloadedStats) Len added in v0.0.37

func (s DownloadedStats) Len() int

func (DownloadedStats) Less added in v0.0.37

func (s DownloadedStats) Less(i, j int) bool

func (DownloadedStats) Swap added in v0.0.37

func (s DownloadedStats) Swap(i, j int)

type StatusService added in v0.0.34

type StatusService struct {
	AllStatus StatusStruct
	// contains filtered or unexported fields
}

type StatusStruct

type StatusStruct struct {
	DNS      map[string]*DNSTargetStatus `json:"DNS"`
	Websites map[string]*WebsiteStatus   `json:"Websites"`
}

type Website

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

func NewWebsite added in v0.0.36

func NewWebsite(websiteUrlStr string) (website *Website)

func (*Website) IncreaseCountersErr added in v0.0.37

func (ws *Website) IncreaseCountersErr(errMsg string)

type WebsiteStatus added in v0.0.34

type WebsiteStatus struct {
	Requests     uint   `json:"requests"`
	Errors       uint   `json:"errors"`
	Downloaded   uint64 `json:"downloaded"`
	LastErrorMsg string `json:"last_error_msg"`
	Status       string `json:"status"`

	Counter_code100 uint `json:"status_100"`
	Counter_code200 uint `json:"status_200"`
	Counter_code300 uint `json:"status_300"`
	Counter_code400 uint `json:"status_400"`
	Counter_code500 uint `json:"status_500"`
}

func (*WebsiteStatus) IncreaseCounters added in v0.0.34

func (ws *WebsiteStatus) IncreaseCounters(downloaded int, responseCode int)

func (*WebsiteStatus) IncreaseCountersErr added in v0.0.34

func (ws *WebsiteStatus) IncreaseCountersErr(errMsg string)

Jump to

Keyboard shortcuts

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