util

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

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

Go to latest
Published: May 3, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPID

func CheckPID(fname string, logger zap.Logger) error

CheckPID checks if another Arachne process is already running.

func CleanUpAll

func CleanUpAll(
	killC *KillChannels,
	receiverOnlyMode bool,
	senderOnlyMode bool,
	PIDPath string,
	sr metrics.Reporter,
	logger zap.Logger,
)

CleanUpAll conducts a clean exit.

func CleanUpRefresh

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

CleanUpRefresh removes state of past refresh.

func PrintBanner

func PrintBanner()

PrintBanner prints the binary's banner.

func RemovePID

func RemovePID(fname string, logger zap.Logger)

RemovePID removes the PID file.

func UnixSignals

func UnixSignals(sigC chan struct{}, logger zap.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