Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: preload content #1464

Merged
merged 21 commits into from
Jul 27, 2018
Merged

feat: preload content #1464

merged 21 commits into from
Jul 27, 2018

Commits on Jul 27, 2018

  1. feat: preload content

    This PR adds a new config property `preload`:
    
    ```js
    new IPFS({
      preload: {
        enabled: false,
        addresses: [{
          bootstrap: '/multiaddr/bootstrap/address/tcp/4001/ipfs/peerId',
          gateway: '/multiaddr/gateway/address/tcp/9090'
        }]
      }
    })
    ```
    
    * `preload.enabled` (default `false`) enables/disabled preloading
    * `preload.addresses` array of node addresses to preload content on
        * `preload.addresses.0.bootstrap` the swarm address of the preload node. This is added to the node's bootstrap addresses
        * `preload.addresses.0.gateway` the gateway address of the preload node. This is the address we make a HTTP HEAD request to, to initiate the preload
    
    After adding content with `ipfs.files.add*` or `ipfs.dag.put`, we make HTTP HEAD requests to _all_ preload gateway addresses (providing `preload.enabled` is true).
    
    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    dca3749 View commit details
    Browse the repository at this point in the history
  2. test: add preload tests for ipfs.files.add and make fixes

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    f5b5854 View commit details
    Browse the repository at this point in the history
  3. refactor: only create new CID if not already stringy

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    332ef98 View commit details
    Browse the repository at this point in the history
  4. chore: appease the linters

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    e6d22d1 View commit details
    Browse the repository at this point in the history
  5. chore: more linter changes

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    2f958b9 View commit details
    Browse the repository at this point in the history
  6. refactor: switch to /api/v0/refs

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    557c8da View commit details
    Browse the repository at this point in the history
  7. fix: many fixes

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    1cdd724 View commit details
    Browse the repository at this point in the history
  8. fix: remove .only

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    f62bae1 View commit details
    Browse the repository at this point in the history
  9. fix: fallback in order

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    ac9d246 View commit details
    Browse the repository at this point in the history
  10. fix: start/stop fix and add preload request time logging

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    89502aa View commit details
    Browse the repository at this point in the history
  11. fix: bootstrap default list in tests

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    7c73142 View commit details
    Browse the repository at this point in the history
  12. fix: more fix bootstrap tests

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    3aa2a1d View commit details
    Browse the repository at this point in the history
  13. fix: more config fix

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    ecf1cc3 View commit details
    Browse the repository at this point in the history
  14. feat: preload mfs root preiodically and preload dag.put

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    977a074 View commit details
    Browse the repository at this point in the history
  15. fix: do not monitor if stopped while starting

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    ef4616a View commit details
    Browse the repository at this point in the history
  16. feat: async mfs-preload start and stop

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    9a4b5e0 View commit details
    Browse the repository at this point in the history
  17. feat: preload object.* API

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    eb7e01f View commit details
    Browse the repository at this point in the history
  18. feat: preload block.put

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    fa1c9f3 View commit details
    Browse the repository at this point in the history
  19. chore: remove .only

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    787d1dd View commit details
    Browse the repository at this point in the history
  20. test: add dag.put preload test

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    d49f17e View commit details
    Browse the repository at this point in the history
  21. fix: ensure MFS is continually preloaded

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    9df1012 View commit details
    Browse the repository at this point in the history