daemon

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon is the device side of midgard without a desktop: it keeps the device's history in sync with the person's other devices, and the local clipboard with the newest copy (specs/redesign.md §3).

func NewDaemon

func NewDaemon() (*Daemon, error)

NewDaemon opens the device's history and sets up its sync. One midgard syncs a device at a time: it fails while the Mac app, or another daemon, does.

func (*Daemon) Close added in v0.2.0

func (m *Daemon) Close() error

Close closes the history and gives up the device, for another midgard to sync it.

func (*Daemon) Run added in v0.0.9

func (m *Daemon) Run(ctx context.Context) (onStart, onStop func() error)

Run runs the daemon: it keeps the connection to the server, and syncs the local clipboard over it.

func (*Daemon) Serve

func (m *Daemon) Serve(ctx context.Context)

Serve keeps the device in sync and watches the local clipboard, until ctx is done.

Jump to

Keyboard shortcuts

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