Documentation
¶
Overview ¶
Package commands cmd/dmsg/dmsg-discovery/commands/dmsg-discovery.go c1-net-dmsg
Cobra entry point for the standalone `skywire dmsg disc` binary. All the actual run logic lives in pkg/services/dmsgdisc — this file is just the flag set, the optional --config file overlay, and the signal-context wiring.
Package commands cmd/dmsg/dmsg-discovery/commands/examples.go c1-net-dmsg
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: dmsgclient.ExecName(), Short: "DMSG Discovery Server", Long: ` ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ │││││└─┐│ ┬───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ ─┴┘┴ ┴└─┘└─┘ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ DMSG Discovery Server - registers and discovers DMSG clients and servers. Depends: redis HTTP Endpoints: GET /health Health check GET /dmsg-discovery/entry/{pk} Get entry by public key POST /dmsg-discovery/entry/ Register/update entry POST /dmsg-discovery/entry/{pk} Register/update entry DEL /dmsg-discovery/entry Delete entry GET /dmsg-discovery/entries All entries GET /dmsg-discovery/visorEntries All visor entries DEL /dmsg-discovery/deregister Deregister entry GET /dmsg-discovery/available_servers Available DMSG servers GET /dmsg-discovery/all_servers All DMSG servers GET /dmsg-discovery/servers/clients Clients by all servers GET /dmsg-discovery/server/{pk}/clients Clients by specific server ` + generateExamples() + ` Example: skywire cli config gen-keys > dmsgd-config.json skywire dmsg disc --sk $(tail -n1 dmsgd-config.json)`, SilenceErrors: true, SilenceUsage: true, DisableSuggestions: true, DisableFlagsInUseLine: true, Version: buildinfo.Version(), Run: func(_ *cobra.Command, _ []string) { if _, err := buildinfo.Get().WriteTo(os.Stdout); err != nil { log.Printf("Failed to output build info: %v", err) } sf := cmdutil.ServiceFlags{Syslog: syslogAddr, SyslogNet: syslogNet, LogLevel: flags.LogLevel, Tag: flags.LogTag("dmsg_disc")} if err := sf.Check(); err != nil { log.Fatal(err) } logger := sf.Logger() cfg, err := buildConfig() if err != nil { logger.WithError(err).Fatal("failed to build dmsg-discovery config") } ctx, cancel := cmdutil.SignalContext(context.Background(), logger) defer cancel() if err := dmsgdisc.New(cfg, logger).Run(ctx); err != nil { logger.WithError(err).Fatal("dmsg-discovery: run failed") } }, }
RootCmd contains commands for dmsg-discovery
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.