unexport all data abstractions on Server (#618)

this patch has no behavior changes, changes are:

* server.Datastore() -> server.datastore
* server.MQ -> server.mq
* server.LogDB -> server.logstore
* server.Agent -> server.agent

these were at a minimum not uniform. further, it's probably better to force
configuration through initialization in `server.New` to ensure thread safety
of referencing if someone does want to modify these as well as forcing things
into our initialization path and reducing the surface area of the Server
abstraction.
This commit is contained in:
Reed Allman
2017-12-21 13:21:02 -06:00
committed by GitHub
parent 6d71f2acc2
commit a8a3e143c7
20 changed files with 57 additions and 54 deletions

View File

@@ -27,11 +27,11 @@ func (s *Server) handleCallList(c *gin.Context) {
return
}
calls, err := s.Datastore().GetCalls(ctx, &filter)
calls, err := s.datastore.GetCalls(ctx, &filter)
if len(calls) == 0 {
// TODO this should be done in front of this handler to even get here...
_, err = s.Datastore().GetApp(c, appName)
_, err = s.datastore.GetApp(c, appName)
}
if err != nil {