1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-13 00:38:34 +08:00

26 Commits

Author SHA1 Message Date
cffec77cea update libp2p with utp dep
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-04-27 14:10:54 -07:00
9f75ac4d75 update utp and cleanup more godeps along the way
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-29 19:18:14 -07:00
97d583dd8f update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-09 09:53:19 -08:00
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
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
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
94bdce63a7 vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
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
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
e5a2896c0e extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
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
rht
007a12e7ef Change Process interface into object variable
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
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
f6fadc4c91 do http server properly so daemon can shut down 2015-05-20 22:42:54 -07:00
fcb8be5607 removed braintree/manners 2015-05-18 15:28:55 -04:00
e02fc1ec6b core/corehttp/corehttp: Add a package comment
I'm not entirely clear on the role that this package is filling, but
this description seems like a reasonable guess based on a quick skim
through it's exported API.
2015-05-02 08:35:34 -07:00
6fe85496f5 corehttp: disable HTTP keep-alive when shutting down server
Once the server is asked to shut down, we stop accepting new
connections, but the 'manners' graceful shutdown will wait for
all existing connections closed to close before finishing.

For keep-alive connections this will never happen unless the
client detects that the server is shutting down through the
ipfs API itself, and closes the connection in response.

This is a problem e.g. with the webui's connections visualization,
which polls the swarm/peers endpoint once a second, and never
detects that the API server was shut down.

We can mitigate this by telling the server to disable keep-alive,
which will add a 'Connection: close' header to the next HTTP
response on the connection. A well behaving client should then
treat that correspondingly by closing the connection.

Unfortunately this doesn't happen immediately in all cases,
presumably depending on the keep-alive timeout of the browser
that set up the connection, but it's at least a step in the
right direction.
2015-04-20 14:55:42 +02:00
c9d3084910 corehttp: ensure node closing/teardown waits for server termination
When closing a node, the node itself only takes care of tearing down
its own children. As corehttp sets up a server based on a node, it
needs to also ensure that the server is accounted for when determining
if the node has been fully closed.
2015-04-20 14:55:42 +02:00
cc830ff2ee corehttp: log when server takes a long time to shut down
The server may stay alive for quite a while due to waiting on
open connections to close before shutting down. We should
find ways to terminate these connections in a more controlled
manner, but in the meantime it's helpful to be able to see
why a shutdown of the ipfs daemon is taking so long.
2015-04-20 14:55:42 +02:00
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
794b7b7b3e corehttp: tear off makeHandler, for tests
License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 12:50:47 -08:00
fbd76ebb5b corehttp: ServeOption supports chaining muxes
Each option now additionally returns the mux to be used by future options. If
every options returns the mux it was passed, the current behavior is unchanged.

However, if the option returns an a new mux, it can mediate requests to handlers
provided by future options:

    return func(n *core.IpfsNode, mux *http.ServeMux) (*http.ServeMux, error) {
      childMux := http.NewServeMux()
      mux.Handle("/", handlerThatDelegatesToChildMux)
      return childMux, nil
    }

License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 11:27:06 -08:00
f1d34a2a85 test/sharness: fix errors
- core: daemon stdout print to cmd + daemon init checks
- core: fixed bug where the gateway was printed as "API"
- sharness/test-lib: daemon init checks
- sharness/test-lib: portable TCP port check
- sharness/init: fix test bits output
- sharness: use common hashes in one place.
- move t0100-http-gateway -> t0111-gateway-writable
- sharness: test-lib funcs for gateway config
- sharness/t0111-gateway-writable: use sh funcs
- sharness/t0111-gateway-writable: fixes
  - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
  - use $FILEPATH, not $path
  - last test seems to fail
2015-01-31 22:54:34 -08:00
e9d3c9828c perform multiaddr conversion in the function 2015-01-24 01:32:27 -08:00
fadede6cb2 separate concerns 2015-01-22 01:28:40 -08:00
fadedf9e68 refactor(core) extract corehttp package
PACKAGE DOCUMENTATION

package corehttp

    FUNCTIONS

    func GatewayOption(n *core.IpfsNode, mux *http.ServeMux) error

    func ListenAndServe(n *core.IpfsNode, addr ma.Multiaddr, options
    ...ServeOption) error

    func WebUIOption(n *core.IpfsNode, mux *http.ServeMux) error

    TYPES

    type ServeOption func(*core.IpfsNode, *http.ServeMux) error

    func DaemonOption(cctx commands.Context) ServeOption
2015-01-22 01:08:59 -08:00