Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ii64/gouring
Go io uring syscall implementation without CGO, rewrite on branch v0.4
https://github.com/ii64/gouring
go golang iouring
Last synced: 12 days ago
JSON representation
Go io uring syscall implementation without CGO, rewrite on branch v0.4
- Host: GitHub
- URL: https://github.com/ii64/gouring
- Owner: ii64
- License: mit
- Created: 2021-12-20T11:34:28.000Z (almost 3 years ago)
- Default Branch: v0.4
- Last Pushed: 2023-04-25T17:28:23.000Z (over 1 year ago)
- Last Synced: 2024-05-22T14:33:48.234Z (6 months ago)
- Topics: go, golang, iouring
- Language: Go
- Homepage:
- Size: 259 KB
- Stars: 101
- Watchers: 7
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- go-awesome - gouring - implement system calls without relying on CGO (Open source library / System Development)
- awesome-iouring - gouring
README
# gouring
[![License: MIT][1]](LICENSE)
[![Go Reference][2]][3]```bash
go get github.com/ii64/gouring
```
## Example```go
// 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) // 1var cqe *gouring.IoUringCqe
err = h.WaitCqe(&cqe)
if err != nil { /*...*/ } // check also EINTR_ = cqe.UserData
_ = cqe.Res
_ = cqe.Flags
```## Graph
| SQPOLL | non-SQPOLL |
| ------ | ---------- |
| ![sqpoll_fig][sqpoll_fig] | ![nonsqpoll_fig][nonsqpoll_fig] |### Reference
https://github.com/axboe/liburing
[1]: https://img.shields.io/badge/License-MIT-yellow.svg
[2]: https://pkg.go.dev/badge/github.com/ii64/gouring.svg
[3]: https://pkg.go.dev/github.com/ii64/gouring
[sqpoll_fig]: assets/sqpoll.svg
[nonsqpoll_fig]: assets/nonsqpoll.svg