Help us shape the future of Go! Take the 2026 Go Developer Survey

dmsgc

package
v1.3.104-alpha1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package dmsgc pkg/dmsg/dmsgc/dmsgc.go c1-net-dmsg dmsg configuration surface: the wire-format types and their JSON methods live in pkg/dmsg/dmsgc/spec (WASM-clean), and pkg/dmsg/dmsgc here aliases them so existing callers keep working unchanged while composing the dmsg.Client constructor and the LAN-priority discovery wrapper that need the heavier transitive deps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(pk cipher.PubKey, sk cipher.SecKey, eb *appevent.Broadcaster, conf *DmsgConfig, httpC *http.Client, directClient disc.APIClient, directOnly bool, masterLogger *logging.MasterLogger) *dmsg.Client

New makes new dmsg client from configuration New builds the visor's SINGLE dmsg client. directClient (when non-nil) carries the preloaded static entries — every dmsg server + a synthetic dmsg-disc entry + the visor's own — so this one client connects and reaches dmsg-disc with no discovery round-trip, replacing the legacy second "direct" client (dmsgDC) that shared this PK and self-evicted on the servers (newest-session-wins). directOnly selects the mode: false (default) = "discovery" (registering fallback: direct-first reads + the visor publishes its entry to dmsg-disc over its own sessions); true = "direct-only" (static direct resolution only, no dmsg-discovery, no registration — experimental). The caller wires httpC.Transport = MakeHTTPTransport(ctx, dmsgC) AFTER this returns, so discovery HTTP rides the client's own sessions (the empty transport is never used before Serve).

func SkipSelfServer added in v1.3.101

func SkipSelfServer(pk cipher.PubKey, conf *DmsgConfig) bool

SkipSelfServer reports whether the client of a visor with key pk skips its own co-resident dmsg server. It does only while it knows another server to connect through.

Types

type Deployment

type Deployment = spec.Deployment

Deployment is the wire-format type for one (dmsg-discovery, transit-servers) pair. Aliased from pkg/dmsg/dmsgc/spec so existing callers writing `dmsgc.Deployment{...}` keep compiling, while the canonical definition lives in the WASM-clean spec package.

type DmsgConfig

type DmsgConfig = spec.DmsgConfig

DmsgConfig is the wire-format type for the visor-side dmsg subsystem configuration. Aliased from pkg/dmsg/dmsgc/spec; see spec.DmsgConfig for the type doc and the JSON-polymorphism notes.

type DmsgLocalRelayConfig

type DmsgLocalRelayConfig = spec.DmsgLocalRelayConfig

DmsgLocalRelayConfig is the local relay acceptor block (Dmsg.LocalRelay).

type DmsgServerConfig

type DmsgServerConfig = spec.DmsgServerConfig

DmsgServerConfig is the in-process dmsg server block (Dmsg.Server).

Directories

Path Synopsis
Package spec pkg/dmsg/dmsgc/spec/spec.go c1-net-dmsg and methods here describe the visor's dmsg-subsystem configuration at the wire (JSON) layer only — no dmsg client construction, no network I/O, no transitive pull on operational packages.
Package spec pkg/dmsg/dmsgc/spec/spec.go c1-net-dmsg and methods here describe the visor's dmsg-subsystem configuration at the wire (JSON) layer only — no dmsg client construction, no network I/O, no transitive pull on operational packages.

Jump to

Keyboard shortcuts

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