helpers

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 3 Imported by: 12

Documentation

Index

Constants

View Source
const (
	Prefix string = "_connector:" + Name + ":"

	MembershipChangedBusEventName   string = "membershipChanged"
	PersistSeqNoChangedBusEventName string = "persistSeqNoChanged"

	JSONFlags uint32 = 50333696
)
View Source
const Name = "cbgo"

Variables

This section is empty.

Functions

func ChunkSlice

func ChunkSlice[T any](slice []T, chunks int) [][]T

func IsMetadata

func IsMetadata(data interface{}) bool

func Retry

func Retry(f func() error, attempts int, sleep time.Duration) (err error)

Types

type Bus

type Bus interface {
	Emit(eventName string, event interface{})
	Subscribe(eventName string, listener Listener)
}

func NewBus

func NewBus() Bus

type Listener

type Listener = func(event interface{})

Jump to

Keyboard shortcuts

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