client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RPCUserAgent = "ditatombot/0.0.2 (Monero RPC Monitoring; https://github.com/ditatompel/xmr-remote-nodes)"

Variables

View Source
var ProbeCmd = &cobra.Command{
	Use:   "probe",
	Short: "Probe remote nodes",
	Run: func(cmd *cobra.Command, args []string) {
		prober := newProber()
		if e, _ := cmd.Flags().GetString("endpoint"); e != "" {
			prober.SetEndpoint(e)
		}
		if t, _ := cmd.Flags().GetBool("no-tor"); t {
			prober.SetAcceptTor(false)
		}
		if t, _ := cmd.Flags().GetBool("no-i2p"); t {
			prober.SetAcceptI2P(false)
		}

		if err := prober.Run(); err != nil {
			switch err.(type) {
			case errProber:
				slog.Error(fmt.Sprintf("[PROBE] %s", err.Error()))
				os.Exit(1)
			default:
				slog.Warn(fmt.Sprintf("[PROBE] %s", err.Error()))
			}
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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