Replies: 1 comment
-
type Config struct {
// Callback function. Olric calls this after
// the server is ready to accept new connections.
Started func()
} Olric calls this function when everything is started successfully. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Shouldn't the db.Start() method take a ctx parameter so that it can observe a timeout for the start procedure? Otherwise, an app that depends on olric must block forever (as far as what's implied by the function signature, despite whether or not Olric's startup logic contains the possibility of a forever block).
EDIT: Having understood the interface a bit further, I guess db.Start() is better called db.Run() and is intended to be executed as a blocking goroutine. In which case, I might suggest that Start() should be a ctx/cancelable operation with timeout support that starts a goroutine for the service, so that embedded deployments can control startup failures / delays more effectively?
Beta Was this translation helpful? Give feedback.
All reactions