app

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 7 Imported by: 1

README

app

Package app contains helper code for building go binaries

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundCommand

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

func NewBackgroundCommand

func NewBackgroundCommand(cmd Command, opts ...BackgroundCommandOption) *BackgroundCommand

func (*BackgroundCommand) Run

func (bg *BackgroundCommand) Run()

func (*BackgroundCommand) Stop

func (c *BackgroundCommand) Stop()

type BackgroundCommandOption

type BackgroundCommandOption func(*BackgroundCommand)

func BackgroundCommandWithExecutionDurationHistogramCounter

func BackgroundCommandWithExecutionDurationHistogramCounter(h metrics.Histogram) BackgroundCommandOption

func BackgroundCommandWithInterval

func BackgroundCommandWithInterval(interval time.Duration) BackgroundCommandOption

BackgroundWithInterval sets the time duration within command executions

func BackgroundCommandWithLogger

func BackgroundCommandWithLogger(l log.Logger) BackgroundCommandOption

type Command

type Command interface {
	Execute(context.Context) error
}

Jump to

Keyboard shortcuts

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