projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f663e
)
prototype encoder
author
Zooko O'Whielacronx
<zooko@zooko.com>
Sun, 3 Dec 2006 00:31:26 +0000
(17:31 -0700)
committer
Zooko O'Whielacronx
<zooko@zooko.com>
Sun, 3 Dec 2006 00:31:26 +0000
(17:31 -0700)
allmydata/encode.py
[new file with mode: 0644]
patch
|
blob
diff --git a/allmydata/encode.py
b/allmydata/encode.py
new file mode 100644
(file)
index 0000000..
946db1e
--- /dev/null
+++ b/
allmydata/encode.py
@@ -0,0
+1,15
@@
+from twisted.internet import defer
+
+class Encoder(object):
+ def __init__(self, infile, m):
+ self.infile = infile
+ self.k = 2
+ self.m = m
+
+ def do_upload(self, landlords):
+ data = self.infile.read()
+ for (peerid, bucket_num, remotebucket) in landlords:
+ remotebucket.callRemote('write', data)
+ remotebucket.callRemote('finalise')
+
+ return defer.succeed()