Displaying 1 result from an estimated 1 matches for "ramdiskconnect".
2020 Apr 24
1
[PATCH nbdkit] golang: Pass Plugin and Connection by reference not value.
...{
+func (p *RAMDiskPlugin) GetReady() error {
// Allocate the RAM disk.
disk = make([]byte, size)
return nil
}
-func (p RAMDiskPlugin) Open(readonly bool) (nbdkit.ConnectionInterface, error) {
+func (p *RAMDiskPlugin) Open(readonly bool) (nbdkit.ConnectionInterface, error) {
return &RAMDiskConnection{}, nil
}
-func (c RAMDiskConnection) GetSize() (uint64, error) {
+func (c *RAMDiskConnection) GetSize() (uint64, error) {
return size, nil
}
// Clients are allowed to make multiple connections safely.
-func (c RAMDiskConnection) CanMultiConn() (bool, error) {
+func (c *RAMDiskConnection...