leaser

package
v0.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL