feat: Implement runtime API cache store and related configurations
- Added RuntimeApiCacheStore for managing API cache entries in memory. - Introduced StorageTarget enum to define various storage targets. - Created StoredCacheEntry record to encapsulate cache entries. - Defined SyncState enum to represent the synchronization state of cache entries. - Added ControlPlaneConfigurationSource enum for different configuration sources. - Developed ControlPlaneRuntimeConfig class for runtime configuration management. - Implemented ControlPlaneStartupConfigResolver for resolving configuration from various sources. - Created ControlPlaneStartupSettings to hold startup configuration values. - Added ResolvedControlPlaneStartupConfig record to encapsulate resolved configuration. - Implemented tests for batch client and cache client functionalities. - Added tests for ControlPlaneStartupConfigResolver to validate configuration resolution logic.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Core Network Wiki
|
||||
|
||||
`core-network` is the Hytale plugin-side runtime for Kweebec Network control-plane access.
|
||||
|
||||
It provides:
|
||||
|
||||
- a shared `ControlPlaneClient`
|
||||
- handwritten convenience clients for common server/player operations
|
||||
- generated API endpoint descriptors from `core-control-plane`
|
||||
- batched HTTP calls through `/api/v1/batch`
|
||||
- API response storage policies for runtime, player, and asset-store-backed data
|
||||
|
||||
## Pages
|
||||
|
||||
- [Getting Started](Getting-Started.md)
|
||||
- [Control Plane Client](Control-Plane-Client.md)
|
||||
- [Batched API Calls](Batched-API-Calls.md)
|
||||
- [API Response Storage](API-Response-Storage.md)
|
||||
- [Generated SDK](Generated-SDK.md)
|
||||
- [Troubleshooting](Troubleshooting.md)
|
||||
|
||||
## Package Map
|
||||
|
||||
```text
|
||||
net.kewwbec.network
|
||||
ControlPlaneClient.java shared client entry point
|
||||
NetworkPlugin.java Hytale plugin entry point and scheduler hook
|
||||
client/ handwritten domain clients
|
||||
http/ low-level JSON HTTP transport
|
||||
batch/ one-off and looped batched calls
|
||||
cache/ cached API data and storage policies
|
||||
generated/api/v1/ generated endpoint descriptors
|
||||
models/ handwritten response/request models
|
||||
```
|
||||
|
||||
## Design Rules
|
||||
|
||||
- Do not edit `net.kewwbec.network.generated` manually.
|
||||
- Add handwritten runtime behavior outside `generated`.
|
||||
- Treat `core-control-plane` as the API owner.
|
||||
- Use batching for repeated or concurrent calls that can tolerate async completion.
|
||||
- Use cache policies when plugin code needs shared ownership of API freshness or push timing.
|
||||
Reference in New Issue
Block a user