util

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

go-util

go-util is a personal helper library for go.

Documentation

Index

Constants

View Source
const (
	LogEncodingJSON    = "json"
	LogEncodingConsole = "console"
)
View Source
const (
	LogLevelInfo  = 1
	LogLevelDebug = 1
)
View Source
const HeaderRequestID = "X-Request-Id"

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(encoding string, debug bool) logr.Logger

Types

type HTTPServer added in v0.2.0

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

func NewHTTPServer added in v0.2.0

func NewHTTPServer(log logr.Logger, addr string, handler http.Handler) *HTTPServer

func (*HTTPServer) Serve added in v0.2.0

func (h *HTTPServer) Serve(ctx context.Context) error

Directories

Path Synopsis
sample
log

Jump to

Keyboard shortcuts

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