handler

package
v0.0.0-...-2f8f7b3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhenSecond = iota
	WhenMinute
	WhenHour
	WhenDay
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHandler

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

func NewFileHandler

func NewFileHandler(fileName string, flag int) (*FileHandler, error)

func (*FileHandler) Close

func (h *FileHandler) Close() error

func (*FileHandler) Write

func (h *FileHandler) Write(b []byte) (int, error)

type IHandler

type IHandler interface {
	Write(p []byte) (int, error)
	Close() error
}

type NullHandler

type NullHandler struct {
}

func NewNullHandler

func NewNullHandler() *NullHandler

func (*NullHandler) Close

func (h *NullHandler) Close() error

func (*NullHandler) Write

func (h *NullHandler) Write(b []byte) (int, error)

type RotatingFileHandler

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

func NewRotatingFileHandler

func NewRotatingFileHandler(fileName string, maxBytes int64, backupCount int) (*RotatingFileHandler, error)

func (*RotatingFileHandler) Close

func (h *RotatingFileHandler) Close() error

func (*RotatingFileHandler) Write

func (h *RotatingFileHandler) Write(b []byte) (int, error)

type SocketHandler

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

func NewSocketHandler

func NewSocketHandler(protocol string, addr string) *SocketHandler

func (*SocketHandler) Close

func (h *SocketHandler) Close() error

func (*SocketHandler) Write

func (h *SocketHandler) Write(b []byte) (int, error)

type StreamHandler

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

func NewStreamHandler

func NewStreamHandler(w io.Writer) *StreamHandler

func (*StreamHandler) Close

func (h *StreamHandler) Close() error

func (*StreamHandler) Write

func (h *StreamHandler) Write(b []byte) (int, error)

type TimeRotatingFileHandler

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

func NewTimeRotatingFileHandler

func NewTimeRotatingFileHandler(fileName string, when int8) *TimeRotatingFileHandler

func (*TimeRotatingFileHandler) Close

func (h *TimeRotatingFileHandler) Close() error

func (*TimeRotatingFileHandler) Write

func (h *TimeRotatingFileHandler) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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