sync

package
v0.0.0-...-ac5d97d Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal[T any](key string, input T) (output map[string]any, b []byte, err error)

func Unmarshal

func Unmarshal[T any](key string, input map[string]any) (output *T, err error)

Types

type Receiver

type Receiver[T any] func([]*T)

type Stream

type Stream string
const (
	StreamExchange    Stream = "SYNC:EXCHANGE"
	StreamBatteryFlow Stream = "SYNC:BATTERYFLOW"
)

func (Stream) String

func (s Stream) String() string

type Sync

type Sync[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](client *redis.Client, e adapter.Environment, stream Stream, reader Receiver[T]) *Sync[T]

func (*Sync[T]) Push

func (s *Sync[T]) Push(data any)

func (*Sync[T]) Run

func (s *Sync[T]) Run()

Jump to

Keyboard shortcuts

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