debug

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2016 License: BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

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.

Jump to

Keyboard shortcuts

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