Back to godoc.org

Package debug

v0.0.0-...-9773273
Latest Go to latest

The latest major version is .

Published: Apr 12, 2019 | License: BSD-3-Clause | Module: golang.org/x/sys

Overview

Package debug provides facilities to execute svc.Handler on console.

Index

func Run

func Run(name string, handler svc.Handler) error

Run executes service name by calling appropriate handler function. The process is running on console, unlike real service. Use Ctrl+C to send "Stop" command to your service.

type ConsoleLog

type ConsoleLog struct {
	Name string
}

ConsoleLog provides access to the console.

func New

func New(source string) *ConsoleLog

New creates new ConsoleLog.

func (*ConsoleLog) Close

func (l *ConsoleLog) Close() error

Close closes console log l.

func (*ConsoleLog) Error

func (l *ConsoleLog) Error(eid uint32, msg string) error

Error writes an error event msg with event id eid to the console l.

func (*ConsoleLog) Info

func (l *ConsoleLog) Info(eid uint32, msg string) error

Info writes an information event msg with event id eid to the console l.

func (*ConsoleLog) Warning

func (l *ConsoleLog) Warning(eid uint32, msg string) error

Warning writes an warning event msg with event id eid to the console l.

type Log

type Log interface {
	Close() error
	Info(eid uint32, msg string) error
	Warning(eid uint32, msg string) error
	Error(eid uint32, msg string) error
}

Log interface allows different log implementations to be used.

Package Files

Documentation was rendered with GOOS=windows and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier