usvc

package module
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 12 Imported by: 20

README

go-usvc

Checks GitHub Issues

Go Reference

Orignally a logging library with my opinions, rapidly becoming the microservice framework I didn't wanna write, with my opinions. Please see gokit or gomicro instead.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Global is a globally-scoped logger than can be used if you have no other choice
	Global logr.Logger
)

Functions

func ChannelWrapper

func ChannelWrapper(fn func() error) <-chan error

ChannelWrapper runs an error-returning func on a background goroutine. If the func returns an error, that is send down the channel that's returned.

func GetLogger

func GetLogger(devMode bool, options ...int) logr.Logger

GetLogger returns a zap-based zapr Logger, typed as a logr.Logger

func InstallSignalHandlers

func InstallSignalHandlers(log logr.Logger) <-chan struct{}

InstallSignalHandlers registers handlers for common OS signals, and closes the returned channel if they're received.

Types

This section is empty.

Jump to

Keyboard shortcuts

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