Categorygithub.com/anshulkamath/gouring
repositorypackage
0.0.3
Repository: https://github.com/anshulkamath/gouring.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

gouring

License: MIT Go Reference

go get github.com/anshulkamath/gouring

Example

// setup
h, err := gouring.New(256, 0)
if err != nil { /*...*/ }
defer h.Close() 

sqe := h.GetSQE()
b := []byte("io_uring!\n")
PrepWrite(sqe, 1, &b[0], len(b), 0)

submitted, err := h.SubmitAndWait(1)
if err != nil { /*...*/ }
println(submitted) // 1

var cqe *gouring.IoUringCqe
err = h.WaitCqe(&cqe) 
if err != nil { /*...*/ } // check also EINTR

_ = cqe.UserData
_ = cqe.Res
_ = cqe.Flags

Graph

SQPOLLnon-SQPOLL
sqpoll_fignonsqpoll_fig

Reference

https://github.com/axboe/liburing