Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v1.3.33 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPerCore = 16
	MaxPerGig  = 4
)

Variables

This section is empty.

Functions

func AdjustOOMScore added in v1.3.33

func AdjustOOMScore(score int, logger *log.Logger) error

func DeduplicateSlice added in v1.3.6

func DeduplicateSlice(incoming []string) (outgoing []string)

func HeadCheck

func HeadCheck(domain string, ua string) bool

func HeadCheckDomains

func HeadCheckDomains(domains []string, ua string) map[string]struct{}

func KillPid

func KillPid(pid int)

func PIDWatcher

func PIDWatcher(pid int)

func WaitAndKill

func WaitAndKill(sleepTime time.Duration, pid int)

Types

type Calculator added in v1.3.6

type Calculator struct {
	OvercommitRatio int64
}

func (*Calculator) CalculateMaxWorkers added in v1.3.6

func (c *Calculator) CalculateMaxWorkers() (int64, error)

Jump to

Keyboard shortcuts

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