logger

package
v0.0.0-...-009b1a8 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Format holds the default log format
	Format = log.Ldate | log.Ltime
)

Variables

This section is empty.

Functions

func InitDataDirectory

func InitDataDirectory(d string) error

InitDataDirectory prepares the folder TIMBER_DATA

Types

type Config

type Config struct {
	Data string   `json:"data"`
	Port int      `json:"port"`
	Logs []string `json:"logs"`
}

func NewConfig

func NewConfig() *Config

func (*Config) Load

func (c *Config) Load() error

type Stream

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

Stream handler type

func NewStream

func NewStream(file string) (*Stream, error)

NewStream returns a new instance of Stream struct

func (*Stream) Start

func (s *Stream) Start()

Start starts a stream

func (*Stream) Stop

func (s *Stream) Stop()

Stop the stream

type StreamHandler

type StreamHandler map[string]*Stream

func (*StreamHandler) Add

func (sh *StreamHandler) Add(lf string, lp string) error

func (*StreamHandler) ServeHTTP

func (sh *StreamHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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