app

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []*cli.Command{
	{
		Name:  "debug",
		Usage: "Debug utilities",
		Subcommands: []*cli.Command{
			{
				Name:   "consensus-key",
				Action: DebugConsensusKeyRun,
				Flags:  Flags,
			},
			{
				Name:   "denom",
				Action: DebugDenomRun,
				Flags:  Flags,
			},
			{
				Name:   "validator",
				Action: DebugValidatorRun,
				Flags:  Flags,
			},
		},
	},
}
View Source
var Flags = []cli.Flag{
	&cli.StringFlag{
		Name:  "chain-id",
		Usage: "to ensure all nodes matches the specific network (dismiss to auto-detected)",
	},
	&cli.StringFlag{
		Name:  "http-addr",
		Usage: "http server address",
		Value: ":8080",
	},
	&cli.StringFlag{
		Name:  "log-level",
		Usage: "log level (debug, info, warn, error)",
		Value: "info",
	},
	&cli.BoolFlag{
		Name:  "debug",
		Usage: "shortcut for --log-level=debug",
	},
	&cli.StringFlag{
		Name:  "namespace",
		Usage: "namespace for Prometheus metrics",
		Value: "cosmos_validator_watcher",
	},
	&cli.BoolFlag{
		Name:  "no-color",
		Usage: "disable colored output",
	},
	&cli.StringSliceFlag{
		Name:  "node",
		Usage: "rpc node endpoint to connect to (specify multiple for high availability)",
		Value: cli.NewStringSlice("http://localhost:26657"),
	},
	&cli.BoolFlag{
		Name:  "no-gov",
		Usage: "disable calls to gov module (useful for consumer chains)",
	},
	&cli.BoolFlag{
		Name:  "no-staking",
		Usage: "disable calls to staking module (useful for consumer chains)",
	},
	&cli.BoolFlag{
		Name:  "no-slashing",
		Usage: "disable calls to slashing module",
	},
	&cli.BoolFlag{
		Name:  "no-commission",
		Usage: "disable calls to get validator commission (useful for chains without distribution module)",
	},
	&cli.BoolFlag{
		Name:  "no-upgrade",
		Usage: "disable calls to upgrade module (for chains created without the upgrade module)",
	},
	&cli.StringFlag{
		Name:  "denom",
		Usage: "denom used in metrics label (eg. atom or uatom)",
	},
	&cli.UintFlag{
		Name:  "denom-exponent",
		Usage: "denom exponent (eg. 6 for atom, 1 for uatom)",
	},
	&cli.DurationFlag{
		Name:  "start-timeout",
		Usage: "timeout to wait on startup for one node to be ready",
		Value: 10 * time.Second,
	},
	&cli.DurationFlag{
		Name:  "stop-timeout",
		Usage: "timeout to wait on stop",
		Value: 10 * time.Second,
	},
	&cli.StringSliceFlag{
		Name:  "validator",
		Usage: "validator address(es) to track (use :my-label to add a custom label in metrics & ouput)",
	},
	&cli.StringFlag{
		Name:  "webhook-url",
		Usage: "endpoint where to send upgrade webhooks (experimental)",
	},
	&cli.StringSliceFlag{
		Name:  "webhook-custom-block",
		Usage: "trigger a custom webhook at a given block number (experimental)",
	},
	&cli.StringFlag{
		Name:  "x-gov",
		Usage: "version of the gov module to use (v1|v1beta1)",
		Value: "v1",
	},
}

Functions

func DebugConsensusKeyRun added in v0.9.0

func DebugConsensusKeyRun(cCtx *cli.Context) error

func DebugDenomRun added in v0.9.0

func DebugDenomRun(cCtx *cli.Context) error

func DebugValidatorRun added in v0.9.0

func DebugValidatorRun(cCtx *cli.Context) error

func RunFunc

func RunFunc(cCtx *cli.Context) error

Types

type HTTPMuxOption added in v0.6.0

type HTTPMuxOption func(*http.ServeMux)

func WithLiveProbe added in v0.6.0

func WithLiveProbe(probe Probe) HTTPMuxOption

func WithMetrics added in v0.6.0

func WithMetrics(registry *prometheus.Registry) HTTPMuxOption

func WithReadyProbe added in v0.6.0

func WithReadyProbe(probe Probe) HTTPMuxOption

type HTTPServer

type HTTPServer struct {
	*http.Server
}

func NewHTTPServer

func NewHTTPServer(addr string, options ...HTTPMuxOption) *HTTPServer

func (*HTTPServer) Run

func (s *HTTPServer) Run() error

func (*HTTPServer) Shutdown

func (s *HTTPServer) Shutdown(ctx context.Context) error

type Probe

type Probe func() bool

Jump to

Keyboard shortcuts

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