diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-22 10:40:06 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-22 10:44:55 -0400 |
commit | 3923667ebdb24680dbb415bd688a8c0326df2212 (patch) | |
tree | 81a6648827130f013053994ba6ec65ddb3cfd772 /Storage.hs | |
parent | 281bc63549a49c173b85d7b80b4b703aab9d3a52 (diff) | |
download | keysafe-3923667ebdb24680dbb415bd688a8c0326df2212.tar.gz |
allow servers to have multiple or no addresses
This allows the server list to contain 3 servers although only 1 is running
so far; uploads to the others will be queued.
It also allows a server to be spread amoung multiple addresses, which may
be useful later for scaling.
This changes BackupRecord serialization, but it's not been in a keysafe
release yet, so that's not a problem.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
Diffstat (limited to 'Storage.hs')
-rw-r--r-- | Storage.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -148,7 +148,8 @@ storeChaff hn port = forever $ do mapConcurrently (go sis rng') [1..totalObjects (shareParams testModeTunables)] where - server = networkStorage Nothing $ Server hn port + server = networkStorage Nothing $ Server (ServerName hn) + [ServerAddress hn port] objsize = objectSize defaultTunables * shareOverhead defaultTunables go sis rng n = do let (b, rng') = cprgGenerate objsize rng |