Documentation ¶
Overview ¶
Package leaser groups all Zero services that should run within a lease.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run( ctx context.Context, client databroker.DataBrokerServiceClient, funcs ...func(ctx context.Context) error, ) error
Run runs services within a lease
func RunWithRestart ¶
func RunWithRestart( ctx context.Context, execFn func(context.Context) error, restartFn func(context.Context) error, ) error
RunWithRestart executes execFn. The execution would be restarted, by means of canceling the context provided to execFn, each time restartFn returns. the error returned by restartFn is purely informational and does not affect the execution; may be nil. the loop is stopped when the context provided to RunWithRestart is canceled or execFn returns an error unrelated to its context cancellation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.