Commit Graph

360 Commits

Author SHA1 Message Date
Jeromy
8f0623255d replace imports with absolute path instead of using symlink
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-03 14:30:50 -07:00
Jeromy
e5512b4115 make publish more configurable and add test for repub
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-30 11:03:44 -07:00
Jeromy
c3e72377b2 write correct address to api file
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-25 15:34:54 -07:00
Marcin Janczyk
20908b3072 Detect connection refused errors during API test on Windows
The first run does not try to connect to API, as an address is not
yet saved in configuration. The second run did not recognize
corrently a refused connection.

Fixes #1661.

License: MIT
Signed-off-by: Marcin Janczyk <marcinjanczyk@gmail.com>
2015-09-25 08:37:10 +02:00
Jeromy
e5a2896c0e extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
Knut Ahlers
5649c7eb4d Fix: Use the right repo to encrypt secrets.
refs #1698

License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-09-14 19:44:28 +02:00
Knut Ahlers
8b6d2b4c69 Added dockerhub trigger
License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-09-14 17:10:12 +02:00
rht
8ec121239e Bump version of dir-index-html
Based on https://github.com/ipfs/go-ipfs/pull/1615

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-09-05 01:06:35 +07:00
Jeromy
71d2ab1fc9 use already created config in daemon.go
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 18:20:18 -07:00
Jeromy
ab0c668ab8 fix panic caused by accessing config after repo closed
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 09:28:36 -07:00
Juan Benet
8c652907de Merge pull request #1598 from ipfs/check-for-api
check for API -- WIP
2015-08-29 06:20:59 +02:00
Juan Benet
9f253dfa7a Merge pull request #1592 from prusnak/empty-repo
Add --empty-repo option for init (#1559)
2015-08-28 14:13:09 +02:00
Jeromy
94000e6490 replace nodebuilder with a nicer interface
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

use NewNode instead of NewIPFSNode in most of the codebase

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

make mocknet work with node constructor better

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

finish cleanup of old construction method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

blockservice.New doesnt return an error anymore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

break up node construction into separate function

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add error case to default filling on node constructor

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-27 08:43:10 -07:00
Juan Batiz-Benet
5040fee906 implement support for --api option
This commit adds support for the --api option, which allows users
to specify an API endpoint to run the cli command against. It enables
much easier control of remote daemons.

It also
- ensures the API server version matches the API client
- implements support for the $IPFS_PATH/api file

Still TODO:
- tests!
- multiaddr to support /dns/

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-27 08:03:56 +02:00
Juan Benet
a052087974 Merge pull request #1569 from rht/daemon-msg
Notify when daemon is ready
2015-08-23 05:11:27 +02:00
Pavol Rusnak
73e820a8bc Add --empty-repo option for init (#1559)
License: MIT
Signed-off-by: Pavol Rusnak <stick@gk2.sk>
2015-08-20 01:01:08 +02:00
rht
dd99a70a7d Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-15 17:08:59 +07:00
rht
35ab1e347b Notify when daemon is ready
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 09:51:52 +07:00
Juan Batiz-Benet
3f1cbe2f43 corehttp: add net.Listener to ServeOption
ServeOptions take the node and muxer, they should get the listener
too as sometimes they need to operate on the listener address.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
Juan Batiz-Benet
7cf5e87cfe Added API + Gateway support for arbitrary HTTP headers
This commit fixes + improves CORS support

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:09 -07:00
Juan Batiz-Benet
470de9222d updated gobuilder dist
https://github.com/Luzifer/gobuilder/pull/52

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 06:35:50 -07:00
Jeromy
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
Jeromy
f9f3c6a527 make offline commands respect timeout
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 14:34:16 -07:00
Henry
1b16712b5a assets: seed gateway index assets on 'ipfs init'
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>

t0080-repo.sh: added gateway assets to pinning tests

License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-04 01:47:07 +02:00
Juan Batiz-Benet
0c9e1e47b5 Merge pull request #1419 from ipfs/bindataAssets
assets: switch to go-bindata
2015-07-03 12:02:25 -07:00
Henry
02377fabf8 assets: remove seed logic from init
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 10:22:21 +02:00
Henry
5fbf1e7416 assets: switch to go-bindata
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 09:52:08 +02:00
Jason Carver
c4fb36b8c8 daemon help docs for CORS
Convey the basic idea, plus an example.  Don't encourage using `*`.

This would have saved me some code spelunking.
2015-07-02 18:06:58 -07:00
Lars Gierth
ed8d3ae388 api: add /metrics endpoint for prometheus
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-29 23:15:15 +02:00
Juan Batiz-Benet
e37fefdfd3 daemon option to optionally disable secio
This commit adds an option to turn off all encryption. This is a mode
used for tests, debugging, achieving protocol implementation interop,
learning about how the protocol works (nc ftw), and worst case
networks which _demand_ to be able to snoop on all the traffic.
(sadly, there are some private intranets like this...). (We should
consider at least _signing_ all this traffic.)

Because of the severity of this sort of thing, this is an
all-or-nothing deal. Either encryption is ON or OFF _fully_.
This way, partially unencrypted nodes cannot be accidentally left
running without the user's understanding. Nodes without encrypted
connections will simply not be able to speak to any of the global
bootstrap nodes, or anybody in the public network.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
Juan Batiz-Benet
9716018ca5 daemon output includes swarm addresses
daemon output now includes initial swarm addresses. this is not a
full solution, as a change in network will not trigger re-printing.
We need a good way to do that.

This made me re-think how we're outputting these messages, perhaps
we should be throwing them as log.Events, and capturing some with
a special keyword to output to the user on stdout. Things like
network addresses being rebound, NATs being holepunched, external
network addresses being figured out, connections established, etc
may be valuable events to show the user. Of course, these should be
very few, as a noisy daemon is an annoying daemon.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
Jeromy
6211ee46c2 close channels and allow daemon to shutdown
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-19 22:40:38 -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
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
Knut Ahlers
a7adb9b2d3 Added nofuse tag for windows builds
This configuration is supported since GoBuilder 1.16.0 so now we should be able to build windows binaries in GoBuilder

License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-06-14 16:21:12 +02:00
Henry
4b337bb7e8 daemon: addressed CR comments 2015-06-08 11:08:10 +02:00
Henry
07b3415cdb http endpoints: dont print before listen
also splits api, gw and fuse bring up into helper functions
2015-06-08 10:56:05 +02:00
Harlan T Wood
e82e5cd87e fix typo 2015-06-06 13:42:54 -07:00
Jeromy
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
rht
8cad2d2c89 Move 'tour' to core/commands
Side effect: this makes 'tour' accessible through the HTTP API
2015-05-26 21:04:03 +07:00
Juan Batiz-Benet
d51f28e895 Merge pull request #1254 from ipfs/fix/refs-fail
fix silent refs failure
2015-05-20 23:25:02 -04:00
Jeromy
002cf5128e fix silent refs failure 2015-05-20 09:46:22 -07:00
Jeromy
8ea502f1b3 clean up and fix init permissions handling 2015-05-20 09:46:09 -07:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
Kristoffer Ström
30f674af0e Add option to allow unrestricted API access 2015-05-10 22:25:36 +02:00
Juan Batiz-Benet
fab5e91a93 Merge pull request #1163 from ipfs/ds-metrics
Record Datastore metrics for flatfs and leveldb
2015-05-02 13:16:04 -07:00
Juan Batiz-Benet
fc28ef401f Merge pull request #1149 from ipfs/fix/better-mem-prof
write memory profiles every 30 seconds when enabled
2015-05-02 12:12:22 -07:00
Tommi Virtanen
c24f421bff Add Go runtime metrics to expvar 2015-05-01 10:51:14 -07:00
Tommi Virtanen
df70fe4ac7 Serve expvars and pprof on the API port 2015-05-01 10:50:44 -07:00
Tommi Virtanen
e78305546c gofmt 2015-04-28 16:18:26 -07:00