zwriter

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWriterOption

type FileWriterOption struct {
	FileName string
	MaxSize  int // MB
	MaxAge   int // DAYS
	Compress bool
}

func (FileWriterOption) NewFileWriter

func (o FileWriterOption) NewFileWriter() *lumberjack.Logger

NewFileWriter 创建一个文件日志写入器

type NATSWriter

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

func (*NATSWriter) Write

func (w *NATSWriter) Write(p []byte) (n int, err error)

type NATSWriterOption

type NATSWriterOption struct {

	// NATS client
	Connection *nats.Conn
	Subject    string
}

func (NATSWriterOption) NewNATSWriter

func (o NATSWriterOption) NewNATSWriter() *NATSWriter

NewNATSWriter 创建一个NATS写入器

Jump to

Keyboard shortcuts

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