Commit Graph

61 Commits

Author SHA1 Message Date
Jeromy
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Jeromy
3faedb5208 remove goprocess from godeps, use gx vendored one
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Jeromy
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
Jeromy
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
Jeromy
4d5af93f43 vendor in new go-datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
Jeromy
45d4b1a8bc fixup datastore interfaces
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
Tommi Virtanen
8f2d820412 S3 datastore support
To test it, set up an S3 bucket (in an AWS region that is not US
Standard, for read-after-write consistency), run `ipfs init`, then
edit `~/.ipfs/config` to say

      "Datastore": {
        "Type": "s3",
        "Region": "us-west-1",
        "Bucket": "mahbukkit",
        "ACL": "private"
      },

with the right values. Set `AWS_ACCESS_KEY_ID` and
`AWS_SECRET_ACCESS_KEY` in the environment and you should be able to
run `ipfs add` and `ipfs cat` and see the bucket be populated.

No automated tests exist, unfortunately. S3 is thorny to simulate.

License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
2016-01-12 08:22:55 -08:00
Tommi Virtanen
1174aab86b thirdparty/s3-datastore: Let caller set ACL, change default to safer "private"
License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
2016-01-12 08:22:55 -08:00
Tommi Virtanen
33d41285d6 thirdparty/s3-datastore: Datastore keys can be binary, hex encode them for S3
License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
2016-01-12 08:22:55 -08:00
Jeromy
94bdce63a7 vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
Jeromy
c023d187b5 update code to use new logging changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-27 11:04:56 -07:00
Jeromy
e5a2896c0e extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
Jeromy
c3280ce885 use new methods from goprocess/context, remove thirdparty/waitable
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-08 21:37:40 -07:00
Jeromy
9bbd9b061d give ipfs get symlink support
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-30 23:34:02 -07:00
Juan Batiz-Benet
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
Juan Batiz-Benet
f460984594 thirdparty/tar: clearer var names for recursion
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:07 +02:00
Juan Batiz-Benet
e3c35d8b76 cmds/get: fix context timeout problem
Get had a random timeout of 60s. This commit fixes that, wiring
up our contexts correctly.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-24 14:43:17 -07:00
Jeromy
10e9ed48bb cleanup unused packages
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 12:34:46 -07:00
Jeromy
96e98a8e13 add sharness test for log endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
Jeromy
89cb430326 fix mirrorWriter write
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
Jeromy
67be6bbd57 skip logs when no writers connected
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
Jeromy
90896f283f clean up unused log options
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
Jeromy
a676b5a8ac move eventlogs to an http endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
rht
18f5fcea28 golint util/, thirdparty/
and exchange/bitswap/testutils.go

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
4b086eff5a Remove Notice{,f} logging interface
And substitute the lines using Notice{,f} with Info{,f}

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
78b6cc5f2d Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
Henry
46db9de2d9 godeps: drop uuid from code.google.com 2015-05-30 02:56:36 +02:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
Henry
5c0403c6ef eventlog: buffer writes before pushing them to lumberjack - same effect, no upstream changes. Thx @natefinch! 2015-04-30 13:33:22 +02:00
Henry
eacaa2d739 Revert "use forked lumberjack (buffers writes)"
This reverts commit 7055d76958.
2015-04-30 13:30:03 +02:00
Henry
7055d76958 use forked lumberjack (buffers writes) 2015-04-29 21:03:39 +02:00
Ho-Sheng Hsiao
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Henry
6350cff7c0 pollEndpoint: improve error output 2015-03-22 14:28:17 +01:00
Henry
14090d4a11 moved pollEndpoint to thirdparty/ 2015-03-04 16:25:41 +01:00
Henry
d69bdecbc7 move back to upstream logrus 2015-03-01 00:59:33 +01:00
Henry
6cc6a80039 godeps: maybebtc renamed is account 2015-02-27 14:40:45 +01:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Brian Tiger Chow
bbcf4e23b1 feat(s3ds) declare the S3 datastore as threadsafe 2015-02-15 04:45:01 -08:00
Brian Tiger Chow
9999106267 feat: initial redis datastore implementation 2015-02-15 04:41:18 -08:00
Brian Tiger Chow
4de93b3387 rename file 2015-02-15 04:41:16 -08:00
Brian Tiger Chow
098edb306f add s3 datastore 2015-02-14 14:13:55 -08:00
Juan Batiz-Benet
91a79bc203 ratelimiter: fixing rate limiter use
Use of the ratelimiter should be conscious of the ratelimiter's
potential closing. any loops that add work to ratelimiter
should (a) only do so if the rate limiter is not closed,
or (b) prevent limiter while work is added
(i.e. use limiter.Go(addWorkHere))
2015-02-06 10:59:03 -08:00
Brian Tiger Chow
bbc9715d4b fix(config, eventlog) use int. it plays nicely with everyone else 2015-02-03 17:19:15 -08:00
Juan Batiz-Benet
2d9550f284 fix(eventlog) add *EventInProgress.Append method 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
68a007945b feat(eventlog) add Pair method 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
809e58f0dd refac(blockservice) extract waitable 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
1dd1e7339b feat(eventlog) add SetError to EventInProgress 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
8f16a4efff feat(eventlog) add support for e := log.Begin... e.Append(Loggable) 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
3c2b6d1205 add iter package 2015-02-01 21:49:39 -08:00
Juan Batiz-Benet
3f5374717d notifs: rate limit notifications 2015-02-01 04:59:48 -08:00