Closed flotter closed 1 year ago
The following PR provided Pebble derived projects to extend the supplied daemon HTTP API handlers.
https://github.com/canonical/pebble/pull/265
However, currently such a handler cannot access the daemon, even though we added a daemon method to also expose the Overlord.
func v1PostDevice(*daemon.Command, req *http.Request, _ *daemon.UserState) daemon.Response { : // Cannot access c.d (daemon is private) ovld := c.d.Overlord() : }
This PR adds c.Daemon() to allow access inside externally defined HTTP API handlers.
I think this was most likely just an oversight at the time, but please let me know if I am missing something obvious where.
The following PR provided Pebble derived projects to extend the supplied daemon HTTP API handlers.
https://github.com/canonical/pebble/pull/265
However, currently such a handler cannot access the daemon, even though we added a daemon method to also expose the Overlord.
This PR adds c.Daemon() to allow access inside externally defined HTTP API handlers.