MCPcopy Create free account
hub / github.com/CPChain/chain / IpfsDatabase

Struct IpfsDatabase

database/ipfs.go:34–39  ·  view source on GitHub ↗

IpfsDatabase is a IPFS-based database.

Source from the content-addressed store, hash-verified

32
33// IpfsDatabase is a IPFS-based database.
34type 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.
42func NewIpfsDB(url string) *IpfsDatabase {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected