Need help with ringbuffer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

smallnest
168 Stars 23 Forks MIT License 17 Commits 1 Opened issues

Description

a thread-safe circular buffer (ring buffer) in Go, implemented io.ReaderWriter interface

Services available

!
?

Need anything else?

Contributors list

# 3,555
Go
Redis
Scala
webfram...
13 commits
# 2,641
Shell
golang
Rust
webfram...
1 commit
# 523,031
dubbo
Go
Shell
motan
1 commit

ringbuffer

License GoDoc travis Go Report Card coveralls

A circular buffer (ring buffer) in Go, implemented io.ReaderWriter interface

wikipedia

    rb := New(1024)

// write
rb.Write([]byte("abcd"))
fmt.Println(rb.Length())
fmt.Println(rb.Free())

// read
buf := make([]byte, 4)
rb.Read(buf)
fmt.Println(string(buf))

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.