Quite a few ways to do this. Can be a configuration parameter (lifetime), can be upon connection termination. Connection termination might be annoying.
Probably a setting in the JSON payload for lifetime of the connection. Then just have a scheduled goroutine that cleans up the state.
Quite a few ways to do this. Can be a configuration parameter (lifetime), can be upon connection termination. Connection termination might be annoying.
Probably a setting in the JSON payload for lifetime of the connection. Then just have a scheduled goroutine that cleans up the state.