round

package
v2.0.0-...-b4d16ca Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 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 Round

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

Round userd for connection round-robin get a reader/writer/timer for split big lock.

func NewRound

func NewRound(c RoundOptions) (r *Round)

NewRound new a round struct.

func (*Round) Reader

func (r *Round) Reader(rn int) *bytes.Pool

Reader get a reader memory buffer.

func (*Round) Timer

func (r *Round) Timer(rn int) *time.Timer

Timer get a timer.

func (*Round) Writer

func (r *Round) Writer(rn int) *bytes.Pool

Writer get a writer memory buffer pool.

type RoundOptions

type RoundOptions struct {
	Timer        int
	TimerSize    int
	Reader       int
	ReadBuf      int
	ReadBufSize  int
	Writer       int
	WriteBuf     int
	WriteBufSize int
}

RoundOptions round options.

Jump to

Keyboard shortcuts

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