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, entryResolve disc.EntryResolveFunc, 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. |