logger

package
v0.0.0-...-c327e57 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	io.Writer
	// contains filtered or unexported fields
}

func (*File) Clear

func (f *File) Clear() error

func (*File) Read

func (f *File) Read(ctx context.Context, lines int, follow bool, l chan string) error

func (*File) Write

func (f *File) Write(msg []byte) (int, error)

type Logger

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

func New

func New(opts *LoggerOpts) (*Logger, error)

func (Logger) GetHost

func (l Logger) GetHost() string

func (Logger) GetPort

func (l Logger) GetPort() uint16

func (Logger) GetWorkdir

func (l Logger) GetWorkdir() string

func (*Logger) Handle

func (l *Logger) Handle(msg types.ProxyMessage) error

func (*Logger) Listen

func (l *Logger) Listen() error

func (*Logger) Stream

func (l *Logger) Stream(ctx context.Context, kind, selflink string, opts StreamOpts, writer http.ResponseWriter) error

type LoggerOpts

type LoggerOpts struct {
	Workdir string
	Host    string
	Port    uint16
}

type Storage

type Storage struct {
	Collection map[string]map[string]*File
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(root string) *Storage

func (Storage) GetStream

func (s Storage) GetStream(kind, selflink string, clear bool) (*File, error)

type StreamOpts

type StreamOpts struct {
	Follow bool
	Lines  int
}

Jump to

Keyboard shortcuts

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