app

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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.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.StringSliceFlag{
		Name:  "validator",
		Usage: "validator address(es) to track (use :my-label to add a custom label in metrics & ouput)",
	},
	&cli.StringFlag{
		Name:  "x-gov",
		Usage: "version of the gov module to use (v1|v1beta1)",
		Value: "v1beta1",
	},
}

Functions

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