quewriter

package
v1.2.24041 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueueWriterStatus

func GetQueueWriterStatus() string

Types

type QueueWriter

type QueueWriter struct {
	OnAfterWrite func(p []byte, n int, err error)
	// contains filtered or unexported fields
}

队列写入, 启用go 进行写入

func NewQueueWriter

func NewQueueWriter(w io.Writer, maxcachel int32) *QueueWriter

maxcachel: 最大允许缓存长度, 0:不限制, 压入时会进行阻塞

func (*QueueWriter) Close

func (this *QueueWriter) Close() error

func (*QueueWriter) RequestDis

func (this *QueueWriter) RequestDis(reason string)

func (*QueueWriter) SetCopyBuf

func (this *QueueWriter) SetCopyBuf(flag int8)

func (*QueueWriter) Wait

func (this *QueueWriter) Wait()

func (*QueueWriter) Write

func (this *QueueWriter) Write(buf []byte) (n int, err error)

type WriteWrapper

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

func NewWriteWrapper

func NewWriteWrapper(fn func(buf []byte) (n int, err error)) *WriteWrapper

func (*WriteWrapper) Write

func (this *WriteWrapper) Write(buf []byte) (n int, err error)

Jump to

Keyboard shortcuts

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