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

Fixes for the brokers package #8

Merged
merged 7 commits into from
Aug 4, 2023
Merged

Commits on Aug 4, 2023

  1. Fix select logic in broker.go

    Since we gracefully handle a cancellation call for IsAuthorized, we need
    to wait for the routine to return and close the done channel when
    CancelIsAuthorized is called, otherwise it just progresses the main
    routine without waiting for the expected values.
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    54a1d58 View commit details
    Browse the repository at this point in the history
  2. Fix dbusbroker.go calls to IA and CIA

    The previous calls for IsAuthorized and CancelIsAuthorized were using
    CallWithContext, which would associate the specified context with the
    calls. Since we rely on context cancelation to properly cancel the
    IsAuthorized operation on the Broker, we can't use the same context on
    the dbus call as it would result in the whole call being cancelled.
    
    Now they use Call instead, which uses context.Backgroung() by default.
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    53f1f92 View commit details
    Browse the repository at this point in the history
  3. Move response codes to their own package

    This allows us to use the examplebroker on the brokers package without
    having issues with import cycles.
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    1ab35d7 View commit details
    Browse the repository at this point in the history
  4. Expose examplebroker types and New() function

    In order to be able to continue using the examplebroker locally, some
    methods need to be public in order to be accessed in the brokers package
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    777d66b View commit details
    Browse the repository at this point in the history
  5. Re-add creation for brokers foo&bar

    When moving examplebroker to a new package, the creation of those
    brokers got affected and they were being created with an empty interface
    that couldn't be used for tests. Now they are examplebrokers.
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    edf9ebd View commit details
    Browse the repository at this point in the history
  6. Update connection call in manager.go

    The function dbus.ConnectSystemBus() does exactly the same thing we were
    doing by using dbus.PrivateSystemBus() and then having to manually Auth
    and Hello, so it's better to use the ConnectSystemBus() one.
    denisonbarbosa committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    1f6c0e2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f2740a View commit details
    Browse the repository at this point in the history