Merge lp:~jameinel/juju-core/api-facade-registry into lp:~go-bot/juju-core/trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~jameinel/juju-core/api-facade-registry |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~jameinel/juju-core/api-rpc-reflect-version |
Diff against target: |
142 lines (+133/-0) 2 files modified
state/apiserver/common/registry.go (+52/-0) state/apiserver/common/registry_test.go (+81/-0) |
To merge this branch: | bzr merge lp:~jameinel/juju-core/api-facade-registry |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+219654@code.launchpad.net |
Description of the change
state/apiserver
This adds a registry.
register themselves with so that srvRoot can return them from a custom
MethodCaller implementation.
This sets up what the actual interface for Facades will be:
type FacadeFactory func(
st *state.State, resources *Resources, authorizer Authorizer, id string,
) (
interface{}, error,
)
It doesn't start actually registering the Facades. It also doesn't
implement srvRoot.
Unmerged revisions
- 2729. By John A Meinel
-
Merge codereview cleanups from api-rpc-
reflect- version - 2728. By John A Meinel
-
Merged api-rpc-
reflect- version into api-facade- registry. - 2727. By John A Meinel
-
merge api-rpc-
reflect- version including trunk and update to github. com/juju/ errors - 2726. By John A Meinel
-
respond to review feedback
use PatchValue and put full stops in comments.
- 2725. By John A Meinel
-
Merged api-rpc-
reflect- version into api-facade- registry. - 2724. By John A Meinel
-
we don't have MethodCaller, thus we don't need to pretend it is there
- 2723. By John A Meinel
-
the common Registry type returns errors.NotFound, but we want them to be CodeNotImplemented.
- 2722. By John A Meinel
-
merge describe-
api-versions but strip things down to just having the registry. - 2721. By John A Meinel
-
merge in rpc-version.
This gives us all of the functionality for passing Version in the RPC,
and changes the MethodCaller signature so that it can take the version
and the objId.
Reviewers: mp+219654_ code.launchpad. net,
Message:
Please take a look.
Description: /common: Add Facades registry
state/apiserver
This adds a registry. TypedNameVersio n registry that the API Facades can
register themselves with so that srvRoot can return them from a custom
MethodCaller implementation.
This sets up what the actual interface for Facades will be:
type FacadeFactory func(
st *state.State, resources *Resources, authorizer Authorizer, id
string,
) (
interface{}, error,
)
It doesn't start actually registering the Facades. It also doesn't MethodCaller in this patch.
implement srvRoot.
https:/ /code.launchpad .net/~jameinel/ juju-core/ api-facade- registry/ +merge/ 219654
Requires: /code.launchpad .net/~jameinel/ juju-core/ api-rpc- reflect- version/ +merge/ 219653
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/97490044/
Affected files (+128, -0 lines): /common/ registry. go /common/ registry_ test.go
A [revision details]
A state/apiserver
A state/apiserver