Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow apps using the bridge to respond to powerbox requests & offers #3222

Merged
merged 18 commits into from
Feb 22, 2020

Commits on Feb 22, 2020

  1. Bridge: specify methods for info re: powerbox requests/offers.

    The next few commits will flesh out relevant documentation to mention
    the header described in the comments, and describe how to use these
    methods. All this will serve as a more precise spec for what to
    implement.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    5411aba View commit details
    Browse the repository at this point in the history
  2. Update docs to describe using non-http apis via the bridge.

    Still need to talk about offer sessions.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    e234257 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9b11ed8 View commit details
    Browse the repository at this point in the history
  4. Include X-Sandstorm-Session-Type: normal in existing sessions.

    Not tested (though it doesn't break the existing tests).
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    786e958 View commit details
    Browse the repository at this point in the history
  5. Fix some clerical errors

    Thanks to @ocdtrekkie for spotting these.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    9f76633 View commit details
    Browse the repository at this point in the history
  6. BridgeContext: make the sessions map private.

    We're going to start tweaking this to support offer & request sessions,
    so now is a good time to do this cleanup.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    f4fee3d View commit details
    Browse the repository at this point in the history
  7. First pass at handling get{Request,Offer}Session.

    This needs further testing, but is now feature complete wrt. sandstorm-io#3197
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    9cde256 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    37e787e View commit details
    Browse the repository at this point in the history
  9. Tweak the way we allocate the results for getSessionOffer/Request.

    It now doesn't crash until those methods are called, rather than on
    creation. I'm going to put this down for a bit and come back when I have
    the mental energy to sit down and understand what's going on.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    b6000e8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ad25e75 View commit details
    Browse the repository at this point in the history
  11. Reverse inverted comparison.

    Apparently I messed this up when factoring out the logic.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    0cec873 View commit details
    Browse the repository at this point in the history
  12. Use kj::str in a couple new places.

    ...mostly in place of kj::mv. At least one of these was responsible for
    some memory corruption I was seeing. Some of the copies this introduces
    *may* be unnecessary, but it's probably better to have the copy in there
    than the unsafe cast, until it is demonstrably a problem.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    d6ce8c4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2af079e View commit details
    Browse the repository at this point in the history
  14. Fix some broken logic re: ownership of map keys.

    See the comments for the current state of affairs. The code I'd written
    previously didn't have any coherent story here, and was *sometimes*
    working I think just because of luck wrt. what memory gets re-used by
    the allocator or doesn't.
    
    This needs more testing, but experimenting with my filesystem demo,
    grains, it gets further than anything before it.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    47524a5 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    719e6f9 View commit details
    Browse the repository at this point in the history
  16. Fix build error due to merge.

    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    383963d View commit details
    Browse the repository at this point in the history
  17. bridge: use one map for session info

    ...instead of three, per @kentonv's suggestion.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    d99cfa1 View commit details
    Browse the repository at this point in the history
  18. Get rid of redundant kj::Own reference.

    Readers are already reference types, so let's just store that directly.
    zenhack committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    66c7d7a View commit details
    Browse the repository at this point in the history