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

7 Commits

Author SHA1 Message Date
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