Controller.MakeSourcemodule Resource : Core.Resourcetype request = {key : Core.Object_key.t;resource : Resource.t option;reader : Cached.t;cancel : Cancel.t;}val component :
?cache:Cache.t ->
?namespace:string ->
?namespaces:string list ->
?label_selector:string ->
?field_selector:string ->
?watches:source list ->
?predicate:(Cache.event -> bool) ->
?name:string ->
?workers:int ->
?metrics:Metrics.t ->
?health:Health.t ->
?cache_sync_timeout:float ->
?reconcile_timeout:float ->
?error_policy:error_policy ->
reconcile:(Client.t -> request -> (reconcile_result, string) result) ->
unit ->
Manager.componentBuild a composable manager component. The primary cache and all watched caches synchronize before workers start, with a 120-second default cache_sync_timeout. reconcile_timeout, when supplied, gives every invocation a linked child cancellation token and classifies expiry as a retryable reconciliation error. Timeouts are cooperative: reconcilers must pass the request token to blocking work. namespaces selects an explicit set of namespaced streams and is mutually exclusive with namespace. health registers a readiness check named <controller>/cache-sync. It succeeds only after every cache has synchronized, initial keys are seeded, and all workers have started; cancellation and shutdown make it fail.
val run :
?cancel:Cancel.t ->
?cache:Cache.t ->
?namespace:string ->
?namespaces:string list ->
?label_selector:string ->
?field_selector:string ->
?watches:source list ->
?predicate:(Cache.event -> bool) ->
?name:string ->
?workers:int ->
?metrics:Metrics.t ->
?health:Health.t ->
?cache_sync_timeout:float ->
?reconcile_timeout:float ->
?error_policy:error_policy ->
Client.t ->
reconcile:(Client.t -> request -> (reconcile_result, string) result) ->
(unit, Client.error) resultStandalone convenience wrapper around component and a one-controller manager. A 410 response atomically resets the shared local cache from a new LIST.