util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastCh

type BroadcastCh chan struct{}

func NewBroadcastCh

func NewBroadcastCh() BroadcastCh

func SetupSignalHandler

func SetupSignalHandler() BroadcastCh

SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.

func (BroadcastCh) Broadcast

func (bc BroadcastCh) Broadcast()

func (BroadcastCh) Wait

func (bc BroadcastCh) Wait()

type RunFunc

type RunFunc func(BroadcastCh)

type RunWrapper

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

func Run

func Run(rfs ...RunFunc) *RunWrapper

func (*RunWrapper) Stop

func (rw *RunWrapper) Stop()

func (*RunWrapper) StopAndWait

func (rw *RunWrapper) StopAndWait()

func (*RunWrapper) Wait

func (rw *RunWrapper) Wait()

Jump to

Keyboard shortcuts

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