IpfsDatabase is a IPFS-based database.
| 32 | |
| 33 | // IpfsDatabase is a IPFS-based database. |
| 34 | type IpfsDatabase struct { |
| 35 | // adapter represents an adapter to IPFS and it could be a fake one for testing. |
| 36 | adapter IpfsAdapter |
| 37 | // rwlock is a read-write lock for avoiding race condition. |
| 38 | rwlock sync.RWMutex |
| 39 | } |
| 40 | |
| 41 | // NewIpfsDB creates a new IpfsDatabase instance with given url which is the IPFS node's API url. |
| 42 | func NewIpfsDB(url string) *IpfsDatabase { |
nothing calls this directly
no outgoing calls
no test coverage detected