Documentation
¶
Overview ¶
Package sync converts libgm events into store rows. The Pump is meant to be registered as an EventHandler on gm.Client. All persistence work runs inline on the libgm callback goroutine — SQLite writes against a local file are fast enough that this hasn't been measured to be a bottleneck. If it ever becomes one, swap Handle for a buffered-channel pump without changing the public interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pump ¶
type Pump struct {
// contains filtered or unexported fields
}
Pump owns the conversion of libgm events into store writes.
func (*Pump) Fatal ¶
Fatal returns a channel that receives terminal connection/auth errors. Long-running commands should select on this and exit non-zero so supervisors can restart or alert instead of silently idling after libgm gives up.
func (*Pump) Handle ¶
Handle is the entry point registered with gm.Client.Subscribe. It must not block; errors are logged but do not propagate.
func (*Pump) ImportContacts ¶
ImportContacts persists a full contact-list response from libgm.