Skip to content

Commit

Permalink
chore: Bump r3map and go-nbd
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Jul 1, 2023
1 parent bbca08e commit 67e1145
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ It is mostly intended as a tech demo for [r3map](https://github.com/pojntfx/r3ma

`ram-dl` achieves this by essentially doing the following:

1. Starting a `go-nbd` server _and_ client locally with r3map's [Device API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/device)
1. Starting a `go-nbd` server _and_ client locally with r3map's [Direct Mount API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/mount)
2. Connecting the NBD _server_ to a remote fRPC backend provided by `ram-ul`
3. Calling `mkswap`, `swapon` and `swapoff`, which enables paging out to the block device provided by the NBD client and thus to the connected remote fRPC backend.

For most real-world use cases, using [r3map](https://github.com/pojntfx/r3map)'s [Mount API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/mount) or [Migration API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/migration) directly is the better (and much faster) option, but if you just want to see the [Download More RAM](https://knowyourmeme.com/memes/download-more-ram) meme implemented in real life, you've come to the right place!
For most real-world use cases, using [r3map](https://github.com/pojntfx/r3map)'s [Managed Mount API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/mount) or [Migration API](https://pkg.go.dev/github.com/pojntfx/r3map@main/pkg/migration) directly is the better (and much faster) option, but if you just want to see the [Download More RAM](https://knowyourmeme.com/memes/download-more-ram) meme implemented in real life, you've come to the right place!

## Installation

Expand Down
4 changes: 2 additions & 2 deletions cmd/ram-dl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
v1frpc "github.com/pojntfx/r3map/pkg/api/frpc/mount/v1"
lbackend "github.com/pojntfx/r3map/pkg/backend"
"github.com/pojntfx/r3map/pkg/chunks"
"github.com/pojntfx/r3map/pkg/device"
"github.com/pojntfx/r3map/pkg/mount"
"github.com/pojntfx/r3map/pkg/services"
"github.com/pojntfx/r3map/pkg/utils"
)
Expand Down Expand Up @@ -123,7 +123,7 @@ func main() {
)
}

dev := device.NewDevice(
dev := mount.NewDirectPathMount(
b,
devFile,

Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module github.com/pojntfx/ram-dl
go 1.20

require (
github.com/pojntfx/go-nbd v0.1.9
github.com/pojntfx/r3map v0.0.0-20230629193227-82982571ab47
github.com/pojntfx/go-nbd v0.1.10
github.com/pojntfx/r3map v0.0.0-20230701225439-3e99062cd1d4
)

require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/gocql/gocql v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ=
github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/gocql/gocql v1.5.2 h1:WnKf8xRQImcT/KLaEWG2pjEeryDB7K0qQN9mPs1C58Q=
Expand Down Expand Up @@ -56,10 +58,10 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pojntfx/go-nbd v0.1.9 h1:rfk3d0fo92YdKTT9MBqJdglE3j9/YOez7WmXsDaxcbs=
github.com/pojntfx/go-nbd v0.1.9/go.mod h1:SehHnbi2e8NiSAKby42Itm8SIoS7b+wAprsfPH3qgYk=
github.com/pojntfx/r3map v0.0.0-20230629193227-82982571ab47 h1:lN8H89zn7CDzQJBvqmdA+zklH9vaQ8ybreV71+UEVbg=
github.com/pojntfx/r3map v0.0.0-20230629193227-82982571ab47/go.mod h1:MpFxdUSDew3VTZoBoBC0+pcnSTfkuxTqp5VggMceMTE=
github.com/pojntfx/go-nbd v0.1.10 h1:mWmE8QMz8hhEz9YHtWk7TfshSrYR9KvP+QtXafBCu9k=
github.com/pojntfx/go-nbd v0.1.10/go.mod h1:SehHnbi2e8NiSAKby42Itm8SIoS7b+wAprsfPH3qgYk=
github.com/pojntfx/r3map v0.0.0-20230701225439-3e99062cd1d4 h1:OyBqTd5G5TcsP5rkdDsPJZE5KERQ26Nd2FvJVaSKRao=
github.com/pojntfx/r3map v0.0.0-20230701225439-3e99062cd1d4/go.mod h1:SPaUgFoUwc62BP/oa6z88GGL9/9Apm/gZ4MXlBsRXds=
github.com/redis/go-redis/v9 v9.0.5 h1:CuQcn5HIEeK7BgElubPP8CGtE0KakrnbBSTLjathl5o=
github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
Expand Down

0 comments on commit 67e1145

Please sign in to comment.