mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
@@ -19,13 +19,13 @@ func (s *Server) handleRouteList(c *gin.Context) {
|
||||
// filter.PathPrefix = c.Query("path_prefix") TODO not hooked up
|
||||
filter.Cursor, filter.PerPage = pageParams(c, true)
|
||||
|
||||
routes, err := s.Datastore().GetRoutesByApp(ctx, appName, &filter)
|
||||
routes, err := s.datastore.GetRoutesByApp(ctx, appName, &filter)
|
||||
|
||||
// if there are no routes for the app, check if the app exists to return
|
||||
// 404 if it does not
|
||||
// TODO this should be done in front of this handler to even get here...
|
||||
if err == nil && len(routes) == 0 {
|
||||
_, err = s.Datastore().GetApp(ctx, appName)
|
||||
_, err = s.datastore.GetApp(ctx, appName)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user