openziti / ziti-sdk-c

A C-based sdk for delivering secure applications over a Ziti Network
https://docs.openziti.io/docs/reference/developer/sdk/ziti-sdk-c
Apache License 2.0
71 stars 14 forks source link

updating a configuration in controller doesn't result in callback #108

Closed dovholuknf closed 3 years ago

dovholuknf commented 4 years ago

When renaming a service the CSDK will get two service callbacks - one with ZITI_SERVICE_UNAVAILABLE and one with ZITI_OK. This will allow an sdk-based app to remove an intercept/add it back properly.

If the config for that service changes - the CSDK will get a service callback with ZITI_OK only.

steps to reproduce

ekoby commented 4 years ago

ZITI_SERVICE_UNAVAILABLE seems like incorrect expectation. ZITI_OK indicates new or updated service, app should check relevant configs for changes

dovholuknf commented 4 years ago

So an update to the config is left to the SDK consumer to 'figure it out'? That's not a friendly implementation and I think the SDK should be more friendly than that. Perhaps additional status baked into the result as a flag? or 'something'?

dovholuknf commented 3 years ago

Updated title to "updating a configuration in controller doesn't result in callback". When an 'internal' config change to either ziti-tunneler-server.v1 or ziti-tunneler-client.v1 happens - the csdk should trigger a callback. Right now that doesn't happen