util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Iterate

func Iterate[T any](
	ctx context.Context,
	handle func(ctx context.Context, data T) error,
	loadData func(ctx context.Context, page int, perPage int) ([]T, error),
	stopLoadingMore func(ctx context.Context, data T) bool,
	perPage int,
	queueSize int,
) error

func Retry

func Retry(fn func() error, pause time.Duration, maxRetries int) error

func RetryWithResult

func RetryWithResult[T any](fn func() (T, error), pause time.Duration, maxRetries int) (T, error)

func SubscriptionEventFromPb

func SubscriptionEventFromPb(data *managementpb.Event) (*dto.SubscriptionEvent, error)

func SubscriptionEventsFromPb

func SubscriptionEventsFromPb(data []*managementpb.Event) ([]*dto.SubscriptionEvent, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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