|
1 | 1 | # Changelog
|
2 | 2 |
|
3 |
| -## O.7 (in progress) |
4 |
| - |
5 |
| -This version involved a significant refactor of internal functionality and HTTP |
6 |
| -handlers to provide better ability to modify services at runtime, provide |
7 |
| -granular control over the endpoints that are exposed, and cleanup handling |
8 |
| -of middleware. |
9 |
| - |
10 |
| -Most internal HTTP handlers for `ServiceSet` and `Tileset` in the |
11 |
| -`github.com/consbio/mbtileserver/handlers` package are now `http.HandlerFunc`s |
12 |
| -instead of custom handlers that returned status codes or errors as in the previous |
13 |
| -versions. |
14 |
| - |
15 |
| -The internal routing within these handlers has been modified to enable |
16 |
| -tilesets to change at runtime. Previously, we were using an `http.ServeMux` |
17 |
| -for all routes, which breaks when the `Tileset` instances pointed to by those |
18 |
| -routes have changed at runtime. Now, the top-level `ServiceSet.Handler()` |
19 |
| -allows dynamic routing to any `Tileset` instances currently published. Each |
20 |
| -`Tileset` is now responsible for routing to its subpaths (e.g., tile endpoint). |
21 |
| - |
22 |
| -The singular public handler endpoint is still an `http.Handler` instance but |
23 |
| -no longer takes any parameters. Those parameters are now handled using |
24 |
| -configuration options instead. |
25 |
| - |
26 |
| -`ServiceSet` now enables configuration to set the root URL, toggle which endpoints |
27 |
| -are exposed and set the internal error logger. These are passed in using a |
28 |
| -`ServiceSetConfig` struct when the service is constructed; these configuration |
29 |
| -options are not modifiable at runtime. |
30 |
| - |
31 |
| -`Tileset` instances are now created individually from a set of source `mbtiles` |
32 |
| -files, instead of generated within `ServiceSet` from a directory. This provides |
33 |
| -more granular control over assigning IDs to tilesets as well as creating, |
34 |
| -updating, or deleting `Tileset` instances. You must generate unique IDs for |
35 |
| -tilesets before adding to the `ServiceSet`; you can use |
36 |
| -`handlers.SHA1ID(filename)` to generate a unique SHA1 ID of the service based on |
37 |
| -its full filename path, or `handlers.RelativePathID(filename, tilePath)` to |
38 |
| -generate the ID from its path and filename within the tile directory `tilePath`. |
39 |
| - |
40 |
| -HMAC authorization has been refactored into middleware external to the Go API. |
41 |
| -It now is instantiated as middleware in `main.go`; this provides better |
42 |
| -separation of concerns between the server (`main.go`) and the Go API. The API |
43 |
| -for interacting with HMAC authorization from the CLI or endpoints remains the |
44 |
| -same. |
45 |
| - |
46 |
| -Most of the updates are demonstrated in `main.go`. |
| 3 | +## O.7 |
47 | 4 |
|
48 | 5 | ### General changes
|
49 | 6 |
|
50 |
| -- Upgraded Docker containers to Go 1.16 |
51 |
| -- Now requires Go 1.13+ |
52 |
| -- Removed `vendor` directory |
53 |
| -- Switched from Travis-CI to Github actions for running tests |
| 7 | +- substantial changes to internal functionality and HTTP handlers, see details below |
| 8 | +- now requires Go 1.13+ |
| 9 | +- upgraded Docker containers to Go 1.16 |
| 10 | +- upgraded Go version used for release to Go 1.16 |
| 11 | +- removed `vendor` directory; no longer needed for Go 1.13 |
| 12 | +- switched from Travis-CI to Github actions for running tests |
54 | 13 |
|
55 | 14 | ### Command-line interface
|
56 | 15 |
|
@@ -96,6 +55,51 @@ Most of the updates are demonstrated in `main.go`.
|
96 | 55 |
|
97 | 56 | - Fixed WebP parsing, now uses simplified check for a `RIFF` header (WebP is only likely RIFF format to be stored in tiles). #98, #110
|
98 | 57 |
|
| 58 | +### Details |
| 59 | + |
| 60 | +This version involved a significant refactor of internal functionality and HTTP |
| 61 | +handlers to provide better ability to modify services at runtime, provide |
| 62 | +granular control over the endpoints that are exposed, and cleanup handling |
| 63 | +of middleware. |
| 64 | + |
| 65 | +Most internal HTTP handlers for `ServiceSet` and `Tileset` in the |
| 66 | +`github.com/consbio/mbtileserver/handlers` package are now `http.HandlerFunc`s |
| 67 | +instead of custom handlers that returned status codes or errors as in the previous |
| 68 | +versions. |
| 69 | + |
| 70 | +The internal routing within these handlers has been modified to enable |
| 71 | +tilesets to change at runtime. Previously, we were using an `http.ServeMux` |
| 72 | +for all routes, which breaks when the `Tileset` instances pointed to by those |
| 73 | +routes have changed at runtime. Now, the top-level `ServiceSet.Handler()` |
| 74 | +allows dynamic routing to any `Tileset` instances currently published. Each |
| 75 | +`Tileset` is now responsible for routing to its subpaths (e.g., tile endpoint). |
| 76 | + |
| 77 | +The singular public handler endpoint is still an `http.Handler` instance but |
| 78 | +no longer takes any parameters. Those parameters are now handled using |
| 79 | +configuration options instead. |
| 80 | + |
| 81 | +`ServiceSet` now enables configuration to set the root URL, toggle which endpoints |
| 82 | +are exposed and set the internal error logger. These are passed in using a |
| 83 | +`ServiceSetConfig` struct when the service is constructed; these configuration |
| 84 | +options are not modifiable at runtime. |
| 85 | + |
| 86 | +`Tileset` instances are now created individually from a set of source `mbtiles` |
| 87 | +files, instead of generated within `ServiceSet` from a directory. This provides |
| 88 | +more granular control over assigning IDs to tilesets as well as creating, |
| 89 | +updating, or deleting `Tileset` instances. You must generate unique IDs for |
| 90 | +tilesets before adding to the `ServiceSet`; you can use |
| 91 | +`handlers.SHA1ID(filename)` to generate a unique SHA1 ID of the service based on |
| 92 | +its full filename path, or `handlers.RelativePathID(filename, tilePath)` to |
| 93 | +generate the ID from its path and filename within the tile directory `tilePath`. |
| 94 | + |
| 95 | +HMAC authorization has been refactored into middleware external to the Go API. |
| 96 | +It now is instantiated as middleware in `main.go`; this provides better |
| 97 | +separation of concerns between the server (`main.go`) and the Go API. The API |
| 98 | +for interacting with HMAC authorization from the CLI or endpoints remains the |
| 99 | +same. |
| 100 | + |
| 101 | +Most of the updates are demonstrated in `main.go`. |
| 102 | + |
99 | 103 | ## 0.6.1
|
100 | 104 |
|
101 | 105 | - upgraded Docker containers to Go 1.14 (solves out of memory issues during builds on small containers)
|
|
0 commit comments