analyze

package
v0.0.0-...-1407253 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnalyzeCmd = &cobra.Command{
	Use:   "analyze",
	Short: "analyze webrtc environment",
}

AnalyzeCmd analyze command, utils to check webrtc status

View Source
var StunStatusCmd = &cobra.Command{
	Use:   "stun-service-status",
	Short: "check public stun service status",
	Run: func(cmd *cobra.Command, args []string) {

		log = zap.New(func(o *zap.Options) {
			o.Development = enableDebug
		})
		log.V(1).Info("checking stun status:")
		stuns, err := load(filename, log)
		if err != nil {
			log.Error(err, "failed to load stun list from file", "file", filename)
			return
		}
		result := analyzeStunStatus(stuns, availableOnly, log)

		for index := range result {
			realAddress := result[index].RealAddress
			if result[index].RealAddress == "" {
				realAddress = "Not Available"
			}
			fmt.Printf("%-50s %s\n", result[index].StunAddress, realAddress)
		}
	},
}

Functions

This section is empty.

Types

type StunStatus

type StunStatus struct {
	StunAddress string
	RealAddress string
}

Jump to

Keyboard shortcuts

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