util

package
v0.0.0-...-a7da24b Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Copyright (c) Marius Börschig. All rights reserved. Licensed under the BSD-3-Clause License.

Copyright (c) Marius Börschig. All rights reserved. Licensed under the BSD-3-Clause License.

Copyright (c) Marius Börschig. All rights reserved. Licensed under the BSD-3-Clause License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daemonize

func Daemonize(cmdline []string, workdir string) (pid int, err error)

XXX Daemonize has side effect of closing stdout in parent process we should double fork

func MakeSelfSignedCert

func MakeSelfSignedCert(keylength int) (string, error)

func MakeSelfSignedPemFile

func MakeSelfSignedPemFile(filename string) error

Types

type LogLevel

type LogLevel int
const (
	INFO  LogLevel = 0
	DEBUG LogLevel = 1
	TRACE LogLevel = 2
	NOISE LogLevel = 3
)

type Logger

type Logger interface {
	AddSink(io.Writer)
	SetLogLevel(LogLevel)
	Info(string, ...interface{})
	Error(string, ...interface{})
	Warn(string, ...interface{})
	Debug(string, ...interface{})
	Trace(string, ...interface{})
	Trace2(string, ...interface{})
}

func NewLogger

func NewLogger(name string) Logger

Jump to

Keyboard shortcuts

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