Jeromy
0de12b5d36
implement ipfs id in the new commands library
2014-11-16 16:46:06 -08:00
Brian Tiger Chow
4b1607819f
log(dht) log a couple events to demonstrate API
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:00:58 -08:00
Brian Tiger Chow
a11c59dcac
feat(peer) add Type (Unspecified, Local, Remote)
2014-11-16 07:00:58 -08:00
Brian Tiger Chow
079bdbacdf
doc(peer) question
2014-11-16 07:00:28 -08:00
Brian Tiger Chow
2e0371c60a
doc(peer) add TODO
...
TODO ensure correctness at ID generation and enforce this by only exposing functions that generate IDs safely. Then any peer.ID type found in the codebase is known to be correct.
2014-11-16 03:43:23 -08:00
Brian Tiger Chow
0aff6873dd
fix(peer) perform bounds check on peer Id when printing String
2014-11-16 03:43:23 -08:00
Brian Tiger Chow
0c530bf5f1
tests(peer) ensure String() works when p created WithId
...
presently, fails
2014-11-16 03:43:23 -08:00
Brian Tiger Chow
ed4a8eb782
chore(tests) add Short() -> SkipNow() to slowest tests
...
vanilla:
21.57 real 45.14 user 8.51 sys
short:
14.40 real 31.13 user 5.56 sys
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-15 02:10:53 -08:00
Jeromy
4f083d54d6
write a few package doc strings to improve look of godoc
2014-11-08 21:42:36 -08:00
Brian Tiger Chow
550b98b7fd
doc(peer)
2014-11-05 10:15:17 -08:00
Brian Tiger Chow
074722cf8a
fix(peer) update latency
2014-11-05 10:15:17 -08:00
Juan Batiz-Benet
40aea2a934
handshake: log whether new addr observed
2014-11-05 04:05:30 -08:00
Jeromy
c3d04570c0
a few more comments
2014-11-03 03:53:16 +00:00
Juan Batiz-Benet
184c25430b
go-vet friendly codebase
...
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Juan Batiz-Benet
701035d5b0
handshake3 (addrs)
2014-10-22 05:25:31 -07:00
Juan Batiz-Benet
f7c1ed39e0
renamed datastore.go -> go-datastore
2014-10-21 15:10:58 -07:00
Juan Batiz-Benet
ac62d13e42
peerstore Put -> Add
...
Changed lots of peer use, and changed the peerstore to ensure
there is only ever one peer in use.
Fixed #174
2014-10-20 06:37:12 -07:00
Juan Batiz-Benet
9ca87fbb93
peer.Peer is now an interface
...

2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
b1d11ccfcb
peerstore constructs peers
...
Now, all peers should be retrieved from the Peerstore, which will
construct the peers accordingly. This ensures there's only one peer
object per peer (opposite would be bad: things get out sync)
cc @whyrusleeping
2014-10-20 00:44:44 -07:00
Juan Batiz-Benet
08af98d412
logging friendliness
2014-10-18 04:36:20 -07:00
Juan Batiz-Benet
e989d6febe
move IDFromPubKey to peer pkg
2014-10-18 04:28:26 -07:00
Jeromy
77cec59083
actually put diagCmd into the super command so it can be run
2014-10-10 13:18:19 -07:00
Juan Batiz-Benet
66839fa1de
changed logging, in dht and elsewhere
...
- use log.* instead of u.*
- use automatic type conversions to .String()
(Peer.String() prints nicely, and avoids calling b58 encoding
until needed)
2014-10-07 21:33:59 -07:00
Juan Batiz-Benet
77fccaa2f3
Obviated need for .ID.Pretty() all over the place.
2014-10-06 04:23:55 -07:00
Juan Batiz-Benet
910a76e220
updated multiaddr use across codebase
2014-10-06 04:13:43 -07:00
Juan Batiz-Benet
f3ae0e8e1b
u.Hash - error
...
the u.Hash error can be safely ignored (panic) because multihash
only fails from the selection of hash function. If the fn + length
are valid, it won't error.
cc @whyrusleeping
2014-10-06 02:26:52 -07:00
Juan Batiz-Benet
612be59643
use string datastore keys.
2014-10-03 15:39:22 -07:00
Juan Batiz-Benet
2507680d77
ok fixed queue test
2014-09-26 03:26:48 -07:00
Juan Batiz-Benet
943c3df416
increment time for queue test
...
it's failing when machine slow (travis)
2014-09-26 02:52:41 -07:00
Juan Batiz-Benet
a93a31f20b
peerstore: re-export ErrNotFound
...
This is to avoid having to import ds elsewhere.
2014-09-26 02:41:46 -07:00
Juan Batiz-Benet
8ed04cfe23
fixed test
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
569268c676
peer.DecodePrettyID
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
98c3afeecf
clean up channel use
2014-09-22 04:05:22 -07:00
Juan Batiz-Benet
551c40930e
chan queue
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
ae1f7688aa
separate to ensure sync safety
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
9e2c3fb8fc
expose Len on PQ
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
51eeec1a79
sync safety to pq
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
a21c1b6b62
PeerQueue (based on XOR distance metric)
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
c4fa995faf
Peer: change locking to whole Peer object.
2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
5dea384510
peer: golint
2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
71e411e538
Peer: only add addresses once.
2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
9c6a3b2091
peerstore test
2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
c08b895851
Peerstore - threadsafe peer collection
...
will have persistence later on as a datastore passed in.
2014-09-22 04:05:19 -07:00
Siraj Ravel
02deb3cccb
last golint
2014-09-11 13:00:56 -07:00
Brian Tiger Chow
7968b45e58
vendor dependencies with godep
...
dependencies are vendored into Godeps/_workspace and commit versions are
recorded in Godeps.json
update datastore to e89f0511
update go.crypto
2014-09-09 22:39:42 -07:00
Jeromy
4b97f1f270
create new crypto package and make rest of repo use it
2014-09-03 20:15:10 +00:00
Jeromy
48865db1ea
change handshake to use pub/priv keys for verification
2014-09-01 19:04:18 -07:00
Jeromy
f09dba772c
more tests and add in table filtering by peer latency
2014-08-11 20:11:23 -07:00
Jeromy
67ddab1e4e
tiered put/get implemented
2014-08-09 22:28:46 -07:00
Jeromy
ae6285e5a3
address issues from code review (issue #25 )
2014-08-08 18:09:21 -07:00