This pull request adds an extra function to the federating database interface: InboxForActor.
The idea of this function is to cut down on remote dereferencing calls by offering implementers the opportunity to return the Inbox of an Actor directly from the database rather than making remote calls to obtain the Actor's inbox IRI.
For implementers who don't want to use this functionality, they can simply return nil, nil from this function, and the previous behavior of go-fed will be triggered instead.
Note 1: I'm not sure how to run tests against this repo, so this PR isn't tested yet.
Note 2: I didn't find any instructions for generating mocks, so I used https://github.com/golang/mock v1.6.0 to regenerate the mock database interface for tests.
This pull request adds an extra function to the federating database interface:
InboxForActor
.The idea of this function is to cut down on remote dereferencing calls by offering implementers the opportunity to return the Inbox of an Actor directly from the database rather than making remote calls to obtain the Actor's inbox IRI.
For implementers who don't want to use this functionality, they can simply return
nil, nil
from this function, and the previous behavior of go-fed will be triggered instead.Note 1: I'm not sure how to run tests against this repo, so this PR isn't tested yet. Note 2: I didn't find any instructions for generating mocks, so I used https://github.com/golang/mock v1.6.0 to regenerate the mock database interface for tests.