Documentation
¶
Index ¶
- Constants
- Variables
- func CheckSendMsdZCEnable() bool
- func CheckSendZCEnable() bool
- func IsTimeout(err error) bool
- func IsUncompleted(err error) bool
- func IsUnsupported(err error) bool
- func PrepareInitIOURingOptions(options ...Option)
- func Release(v *Vortex) (err error)
- func ReleaseSplicePipe(pipe *SplicePipe)
- type Curve
- type CurveTransmission
- type FixedBuffer
- type Future
- type Operation
- func (op *Operation) Addr() (addr *syscall.RawSockaddrAny, addrLen int)
- func (op *Operation) Close()
- func (op *Operation) Complete()
- func (op *Operation) Control() []byte
- func (op *Operation) ControlLen() int
- func (op *Operation) Flags() int
- func (op *Operation) Hijack()
- func (op *Operation) Name() string
- func (op *Operation) PrepareAccept(fd int, addr *syscall.RawSockaddrAny, addrLen int)
- func (op *Operation) PrepareCancel(target *Operation)
- func (op *Operation) PrepareClose(fd int)
- func (op *Operation) PrepareConnect(fd int, addr *syscall.RawSockaddrAny, addrLen int)
- func (op *Operation) PrepareNop() (err error)
- func (op *Operation) PrepareReadFixed(fd int, buf *FixedBuffer)
- func (op *Operation) PrepareReceive(fd int, b []byte)
- func (op *Operation) PrepareReceiveMsg(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...)
- func (op *Operation) PrepareSend(fd int, b []byte)
- func (op *Operation) PrepareSendMsg(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...)
- func (op *Operation) PrepareSendMsgZC(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...)
- func (op *Operation) PrepareSendZC(fd int, b []byte)
- func (op *Operation) PrepareSplice(fdIn int, offIn int64, fdOut int, offOut int64, nbytes uint32, flags uint32)
- func (op *Operation) PrepareTee(fdIn int, fdOut int, nbytes uint32, flags uint32)
- func (op *Operation) PrepareWriteFixed(fd int, buf *FixedBuffer)
- func (op *Operation) Timeout() time.Duration
- func (op *Operation) WithDeadline(deadline time.Time) *Operation
- type Option
- func WithEntries(entries int) Option
- func WithFlags(flags uint32) Option
- func WithFlagsSchema(schema string) Option
- func WithPrepareSQEAFFCPU(cpu int) Option
- func WithPrepareSQEBatchSize(size uint32) Option
- func WithPrepareSQEIdleTime(d time.Duration) Option
- func WithRegisterFixedBuffer(size uint32, count uint32) Option
- func WithSQThreadCPU(cpuId uint32) Option
- func WithSQThreadIdle(idle uint32) Option
- func WithWaitCQEAFFCPU(cpu int) Option
- func WithWaitCQEBatchSize(size uint32) Option
- func WithWaitCQETimeCurve(curve Curve) Option
- type Options
- type Queue
- type Result
- type SplicePipe
- type TimeoutError
- type Transmission
- type Vortex
- func (vortex *Vortex) Accept(ctx context.Context, fd int, addr *syscall.RawSockaddrAny, addrLen int, ...) (n int, err error)
- func (vortex *Vortex) AcquireBuffer() *FixedBuffer
- func (vortex *Vortex) AwaitOperation(ctx context.Context, op *Operation) (n int, cqeFlags uint32, err error)
- func (vortex *Vortex) Cancel(target *Operation) (ok bool)
- func (vortex *Vortex) Close(ctx context.Context, fd int) (err error)
- func (vortex *Vortex) Connect(ctx context.Context, fd int, addr *syscall.RawSockaddrAny, addrLen int, ...) (n int, err error)
- func (vortex *Vortex) PrepareAccept(fd int, addr *syscall.RawSockaddrAny, addrLen int, deadline time.Time) Future
- func (vortex *Vortex) PrepareClose(fd int) Future
- func (vortex *Vortex) PrepareConnect(fd int, addr *syscall.RawSockaddrAny, addrLen int, deadline time.Time) Future
- func (vortex *Vortex) PrepareOperation(op *Operation) Future
- func (vortex *Vortex) PrepareReadFixed(fd int, buf *FixedBuffer, deadline time.Time) Future
- func (vortex *Vortex) PrepareReceive(fd int, b []byte, deadline time.Time) Future
- func (vortex *Vortex) PrepareReceiveMsg(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...) Future
- func (vortex *Vortex) PrepareSend(fd int, b []byte, deadline time.Time) Future
- func (vortex *Vortex) PrepareSendMsg(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...) Future
- func (vortex *Vortex) PrepareSendMsgZC(fd int, b []byte, oob []byte, addr *syscall.RawSockaddrAny, addrLen int, ...) Future
- func (vortex *Vortex) PrepareSendZC(fd int, b []byte, deadline time.Time) Future
- func (vortex *Vortex) PrepareSplice(fdIn int, offIn int64, fdOut int, offOut int64, nbytes uint32, flags uint32) Future
- func (vortex *Vortex) PrepareTee(fdIn int, fdOut int, nbytes uint32, flags uint32) Future
- func (vortex *Vortex) PrepareWriteFixed(fd int, buf *FixedBuffer, deadline time.Time) Future
- func (vortex *Vortex) ReadFixed(ctx context.Context, fd int, buf *FixedBuffer, deadline time.Time) (n int, err error)
- func (vortex *Vortex) Receive(ctx context.Context, fd int, b []byte, deadline time.Time) (n int, err error)
- func (vortex *Vortex) ReceiveFrom(ctx context.Context, fd int, b []byte, addr *syscall.RawSockaddrAny, ...) (n int, err error)
- func (vortex *Vortex) ReceiveMsg(ctx context.Context, fd int, b []byte, oob []byte, ...) (n int, oobn int, flag int, err error)
- func (vortex *Vortex) RegisterFixedFile(fd int) (index uint32, err error)
- func (vortex *Vortex) ReleaseBuffer(buf *FixedBuffer)
- func (vortex *Vortex) Send(ctx context.Context, fd int, b []byte, deadline time.Time) (n int, err error)
- func (vortex *Vortex) SendMsg(ctx context.Context, fd int, b []byte, oob []byte, ...) (n int, oobn int, err error)
- func (vortex *Vortex) SendMsgZC(ctx context.Context, fd int, b []byte, oob []byte, ...) (n int, oobn int, err error)
- func (vortex *Vortex) SendTo(ctx context.Context, fd int, b []byte, addr *syscall.RawSockaddrAny, ...) (n int, err error)
- func (vortex *Vortex) SendToZC(ctx context.Context, fd int, b []byte, addr *syscall.RawSockaddrAny, ...) (n int, err error)
- func (vortex *Vortex) SendZC(ctx context.Context, fd int, b []byte, deadline time.Time) (n int, err error)
- func (vortex *Vortex) Sendfile(ctx context.Context, dst int, r io.Reader, useZC bool) (written int64, err error)
- func (vortex *Vortex) Shutdown() (err error)
- func (vortex *Vortex) Splice(ctx context.Context, dst int, src int, remain int64) (n int64, err error)
- func (vortex *Vortex) Start(ctx context.Context) (err error)
- func (vortex *Vortex) UnregisterFixedFile(index uint32) (err error)
- func (vortex *Vortex) WriteFixed(ctx context.Context, fd int, buf *FixedBuffer, deadline time.Time) (n int, err error)
- type WaitNTime
Constants ¶
View Source
const ( ReadyOperationStatus int64 = iota ProcessingOperationStatus HijackedOperationStatus CompletedOperationStatus )
View Source
const ( DefaultFlagsSchema = "DEFAULT" PerformanceFlagsSchema = "PERFORMANCE" )
View Source
const (
MaxSpliceSize = 1 << 20
)
Variables ¶
View Source
var ( Uncompleted = errors.New("uncompleted") Timeout = &TimeoutError{} UnsupportedOp = errors.New("unsupported op") )
Functions ¶
func CheckSendMsdZCEnable ¶
func CheckSendMsdZCEnable() bool
func CheckSendZCEnable ¶
func CheckSendZCEnable() bool
func IsUncompleted ¶
func IsUnsupported ¶
func PrepareInitIOURingOptions ¶ added in v1.2.2
func PrepareInitIOURingOptions(options ...Option)
func ReleaseSplicePipe ¶
func ReleaseSplicePipe(pipe *SplicePipe)
Types ¶
type CurveTransmission ¶
type CurveTransmission struct {
// contains filtered or unexported fields
}
type FixedBuffer ¶ added in v1.3.0
type FixedBuffer struct {
// contains filtered or unexported fields
}
func (*FixedBuffer) Index ¶ added in v1.3.0
func (buf *FixedBuffer) Index() int
func (*FixedBuffer) Length ¶ added in v1.3.0
func (buf *FixedBuffer) Length() int
func (*FixedBuffer) Reset ¶ added in v1.3.0
func (buf *FixedBuffer) Reset()
func (*FixedBuffer) Source ¶ added in v1.5.3
func (buf *FixedBuffer) Source() uint32
func (*FixedBuffer) Validate ¶ added in v1.3.0
func (buf *FixedBuffer) Validate() bool
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
func NewOperation ¶
func (*Operation) ControlLen ¶
func (*Operation) PrepareAccept ¶
func (op *Operation) PrepareAccept(fd int, addr *syscall.RawSockaddrAny, addrLen int)
func (*Operation) PrepareCancel ¶
func (*Operation) PrepareClose ¶ added in v0.2.0
func (*Operation) PrepareConnect ¶
func (op *Operation) PrepareConnect(fd int, addr *syscall.RawSockaddrAny, addrLen int)
func (*Operation) PrepareNop ¶
func (*Operation) PrepareReadFixed ¶ added in v1.3.0
func (op *Operation) PrepareReadFixed(fd int, buf *FixedBuffer)
func (*Operation) PrepareReceive ¶
func (*Operation) PrepareReceiveMsg ¶
func (*Operation) PrepareSend ¶
func (*Operation) PrepareSendMsg ¶
func (*Operation) PrepareSendMsgZC ¶
func (*Operation) PrepareSendZC ¶
func (*Operation) PrepareSplice ¶
func (*Operation) PrepareTee ¶
func (*Operation) PrepareWriteFixed ¶ added in v1.3.0
func (op *Operation) PrepareWriteFixed(fd int, buf *FixedBuffer)
type Option ¶
type Option func(*Options)
func WithEntries ¶
func WithFlagsSchema ¶ added in v1.2.2
func WithPrepareSQEAFFCPU ¶ added in v1.5.3
func WithPrepareSQEBatchSize ¶ added in v1.5.3
func WithPrepareSQEIdleTime ¶ added in v1.5.3
func WithRegisterFixedBuffer ¶ added in v1.3.0
func WithSQThreadCPU ¶ added in v1.2.0
func WithSQThreadIdle ¶ added in v1.2.0
func WithWaitCQEAFFCPU ¶ added in v1.5.3
func WithWaitCQEBatchSize ¶ added in v1.5.3
func WithWaitCQETimeCurve ¶ added in v1.5.3
type SplicePipe ¶
type SplicePipe struct {
// contains filtered or unexported fields
}
func AcquireSplicePipe ¶
func AcquireSplicePipe() (*SplicePipe, error)
func NewSplicePipe ¶
func NewSplicePipe() *SplicePipe
func (*SplicePipe) Close ¶
func (pipe *SplicePipe) Close() (err error)
func (*SplicePipe) DrainN ¶
func (pipe *SplicePipe) DrainN(n int)
func (*SplicePipe) PumpN ¶
func (pipe *SplicePipe) PumpN(n int)
func (*SplicePipe) ReaderFd ¶
func (pipe *SplicePipe) ReaderFd() int
func (*SplicePipe) WriterFd ¶
func (pipe *SplicePipe) WriterFd() int
type TimeoutError ¶
type TimeoutError struct{}
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
func (*TimeoutError) Is ¶
func (e *TimeoutError) Is(err error) bool
func (*TimeoutError) Temporary ¶
func (e *TimeoutError) Temporary() bool
func (*TimeoutError) Timeout ¶
func (e *TimeoutError) Timeout() bool
type Transmission ¶
func NewCurveTransmission ¶
func NewCurveTransmission(curve Curve) Transmission
type Vortex ¶
type Vortex struct {
// contains filtered or unexported fields
}
func (*Vortex) AcquireBuffer ¶ added in v1.3.0
func (vortex *Vortex) AcquireBuffer() *FixedBuffer
func (*Vortex) AwaitOperation ¶ added in v1.5.4
func (*Vortex) PrepareAccept ¶
func (*Vortex) PrepareClose ¶ added in v0.2.0
func (*Vortex) PrepareConnect ¶
func (*Vortex) PrepareOperation ¶
func (*Vortex) PrepareReadFixed ¶ added in v1.3.0
func (*Vortex) PrepareReceive ¶
func (*Vortex) PrepareReceiveMsg ¶
func (*Vortex) PrepareSend ¶
func (*Vortex) PrepareSendMsg ¶
func (*Vortex) PrepareSendMsgZC ¶
func (*Vortex) PrepareSendZC ¶
func (*Vortex) PrepareSplice ¶
func (*Vortex) PrepareTee ¶
func (*Vortex) PrepareWriteFixed ¶ added in v1.3.0
func (*Vortex) ReceiveFrom ¶ added in v1.2.0
func (*Vortex) ReceiveMsg ¶ added in v1.2.0
func (*Vortex) RegisterFixedFile ¶ added in v1.5.4
func (*Vortex) ReleaseBuffer ¶ added in v1.3.0
func (vortex *Vortex) ReleaseBuffer(buf *FixedBuffer)
func (*Vortex) UnregisterFixedFile ¶ added in v1.5.4
Click to show internal directories.
Click to hide internal directories.