streamlog

package
v0.0.0-...-7c5168d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2013 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter interface {
	Format(url.Values) string
}

type StreamLogger

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

A StreamLogger makes messages sent to it available through HTTP.

func New

func New(name string, size int) *StreamLogger

New returns a new StreamLogger with a buffer that can contain size messages. Any messages sent to it will be available at url.

func (*StreamLogger) Send

func (logger *StreamLogger) Send(message Formatter)

Send sends message to all the writers subscribed to logger. Calling Send does not block.

func (*StreamLogger) ServeHTTP

func (logger *StreamLogger) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*StreamLogger) ServeLogs

func (logger *StreamLogger) ServeLogs(url string)

Handle makes logs sent to logger available throught HTTP at url.

func (*StreamLogger) String

func (logger *StreamLogger) String() string

Jump to

Keyboard shortcuts

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