File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,21 @@ class Hyperblobs {
74
74
this . blockSize = opts . blockSize || DEFAULT_BLOCK_SIZE
75
75
76
76
this . _lock = mutexify ( )
77
- this . _core = core
78
77
this . _monitors = new Set ( )
79
78
80
79
this . _boundUpdatePeers = this . _updatePeers . bind ( this )
81
80
this . _boundOnUpload = this . _onUpload . bind ( this )
82
81
this . _boundOnDownload = this . _onDownload . bind ( this )
83
82
}
84
83
84
+ get key ( ) {
85
+ return this . core . key
86
+ }
87
+
88
+ get discoveryKey ( ) {
89
+ return this . core . discoveryKey
90
+ }
91
+
85
92
get feed ( ) {
86
93
return this . core
87
94
}
@@ -90,6 +97,10 @@ class Hyperblobs {
90
97
return this . _lock . locked
91
98
}
92
99
100
+ replicate ( isInitiator , opts ) {
101
+ return this . core . replicate ( isInitiator , opts )
102
+ }
103
+
93
104
ready ( ) {
94
105
return this . core . ready ( )
95
106
}
@@ -160,12 +171,12 @@ class Hyperblobs {
160
171
}
161
172
162
173
createReadStream ( id , opts ) {
163
- const core = ( opts && opts . core ) ? opts . core : this . _core
174
+ const core = ( opts && opts . core ) ? opts . core : this . core
164
175
return new BlobReadStream ( core , id , opts )
165
176
}
166
177
167
178
createWriteStream ( opts ) {
168
- const core = ( opts && opts . core ) ? opts . core : this . _core
179
+ const core = ( opts && opts . core ) ? opts . core : this . core
169
180
return new BlobWriteStream ( core , this . _lock , opts )
170
181
}
171
182
You can’t perform that action at this time.
0 commit comments