util

package
v0.0.0-...-c5fcff7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPID

func CheckPID(fname string, logger *log.Logger) error

CheckPID checks if another Arachne process is already running.

func CleanUpAll

func CleanUpAll(
	killC *KillChannels,
	receiverOnlyMode bool,
	senderOnlyMode bool,
	resolveDNS bool,
	conn *ip.Conn,
	PIDPath string,
	sr metrics.Reporter,
	logger *log.Logger,
)

CleanUpAll conducts a clean exit.

func CleanUpRefresh

func CleanUpRefresh(killC *KillChannels, receiverOnlyMode bool, senderOnlyMode bool, resolveDNS bool)

CleanUpRefresh removes state of past refresh.

func PrintBanner

func PrintBanner()

PrintBanner prints the binary's banner.

func RemovePID

func RemovePID(fname string, logger *log.Logger)

RemovePID removes the PID file.

func UnixSignals

func UnixSignals(sigC chan struct{}, logger *log.Logger)

UnixSignals handles the UNIX signals received.

Types

type KillChannels

type KillChannels struct {
	Receiver   chan struct{}
	Echo       chan struct{}
	Collector  chan struct{}
	DNSRefresh chan struct{}
}

KillChannels includes all channels to tell goroutines to terminate.

Jump to

Keyboard shortcuts

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