cfg

package
v0.0.0-...-e363bdf Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package cfg sets up a unix socket where it accepts requests overu for starting, stopping utasks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UTaskTimer

func UTaskTimer(c chan httpmux.SingleShotReq, chanDone <-chan struct{}, cDB chan<- db.TaskTrace)

UTaskTimer intended as a go routine that receives a time duration for cfg over the channel upon receiving the time, it starts a timer

func UnixSocketSetup

func UnixSocketSetup(unixSocketAddr string) (net.Listener, error)

UnixSocketSetup creates a unix socket & starts a listener at the unix socket returns the listener and nil

func UtaskMain

func UtaskMain(unixSocketAddr string, cDone <-chan struct{}) error

UtaskMain stars a listener at the given unix socket address serving cfg http requests takes in a unix socket address

Types

type SingleShot

type SingleShot struct {
	T       time.Duration // length of the utask
	CsvFile string        // csv file for output
	Name    string        // name of the task
	Details string        // task notes
}

SingleShot for requests to start one time utask

Jump to

Keyboard shortcuts

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