generated fromipfs/ipfs-repository-template
- Notifications
You must be signed in to change notification settings - Fork1
Buffered FIFO interface to datastore
License
NotificationsYou must be signed in to change notification settings
ipfs/go-dsqueue
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Buffered FIFO interface to the datastore
The dsqueue package provides a buffered FIFO queue backed by aBatching Datastore. Queued items are persisted in the datastore when the input buffer is full, after some amount of idle time, and when the queue is shuddown.
https://pkg.go.dev/github.com/ipfs/go-dsqueue
ds=getBatchingDatastore()dsq:=dsqueue.New(ds,"ExampleQueue")deferdsq.Close()c,err:=cid.Decode("QmPNHBy5h7f19yJDt7ip9TvmMRbqmYsa6aetkrsc1ghjLB")iferr!=nil {panic(err)}dsq.Put(c.Bytes())out:=<-dsq.Out()c2,err:=cid.Parse(out)iferr!=nil {panic(err)}ifc2!=c {fmt.Fprintln(os.Stderr,"cids are not quual")}
Contributions are welcome! This repository is part of the IPFS project and therefore governed by ourcontributing guidelines.
About
Buffered FIFO interface to datastore
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.