Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServiceName = "network-node-crawler" ServiceVersion = "v0.0.0" StartTimeout = 5 * time.Minute )
View Source
var Flags = []cli.Flag{ &cli.BoolFlag{ Name: "nn-crawler-logger-production", Usage: "make it true if you need logging on production environment", Value: false, EnvVars: []string{"NETWORK_NODE_CRAWLER_LOGGER_PRODUCTION"}, }, &cli.StringFlag{ Name: "nn-crawler-grpc-host", Usage: "it is gRPC server host", Value: "0.0.0.0", EnvVars: []string{"NETWORK_NODE_CRAWLER_GRPC_HOST"}, }, &cli.StringFlag{ Name: "nn-crawler-grpc-port", Usage: "it is gRPC server port", Value: "8080", EnvVars: []string{"NETWORK_NODE_CRAWLER_GRPC_PORT"}, }, &cli.StringFlag{ Name: "nn-crawler-http-gateway-host", Usage: "it is HTTP gateway host", Value: "0.0.0.0", EnvVars: []string{"NETWORK_NODE_CRAWLER_HTTP_GATEWAY_HOST"}, }, &cli.StringFlag{ Name: "nn-crawler-http-gateway-port", Usage: "it is HTTP gateway port", Value: "9090", EnvVars: []string{"NETWORK_NODE_CRAWLER_HTTP_GATEWAY_PORT"}, }, &cli.BoolFlag{ Name: "nn-crawler-enabled-health-server", Usage: "make it true if you need to enable health server", Value: false, EnvVars: []string{"NETWORK_NODE_CRAWLER_ENABLED_HEALTH_SERVER"}, }, &cli.StringFlag{ Name: "nn-crawler-health-server-host", Usage: "it is health server host", Value: "0.0.0.0", EnvVars: []string{"NETWORK_NODE_CRAWLER_HEALTH_SERVER_HOST"}, }, &cli.StringFlag{ Name: "nn-crawler-health-server-port", Usage: "it is health server port", Value: "10010", EnvVars: []string{"NETWORK_NODE_CRAWLER_HEALTH_SERVER_PORT"}, }, &cli.StringFlag{ Name: "nn-crawler-liveness-gateway-host", Usage: "it is liveness gateway host", Value: "0.0.0.0", EnvVars: []string{"NETWORK_NODE_CRAWLER_LIVENESS_GATEWAY_HOST"}, }, &cli.StringFlag{ Name: "nn-crawler-liveness-gateway-port", Usage: "it is liveness gateway port", Value: "8086", EnvVars: []string{"NETWORK_NODE_CRAWLER_LIVENESS_GATEWAY_PORT"}, }, &cli.DurationFlag{ Name: "nn-crawler-grpc-max-conn-age", Usage: "it is max age of connection with gRPC server", Value: 5 * time.Minute, EnvVars: []string{"NETWORK_NODE_CRAWLER_GRPC_MAX_CONNECTION_AGE"}, }, }
View Source
var Module = func(cctx *cli.Context) fx.Option { return fx.Options( fx.Provide(func() fxConfig { return fxConfig{ Logger: &fxlogger.Config{ Production: cctx.Bool("nn-crawler-logger-production"), }, GRPC: &fxgrpc.Config{ GRPC: fxgrpc.GRPCConfig{ Host: cctx.String("nn-crawler-grpc-host"), Port: cctx.String("nn-crawler-grpc-port"), MaxConnectionAge: cctx.Duration("nn-crawler-grpc-max-conn-age"), KeepAliveEnforcementMinTime: cctx.Duration("nn-crawler-grpc-keep-alive-enforcement-min-time"), KeepAliveEnforcementPermitWithoutStream: cctx.Bool("nn-crawler-grpc-keep-alive-enforcement-permit-without-stream"), }, Health: fxgrpc.HealthConfig{ Enabled: cctx.Bool("nn-crawler-enabled-health-server"), Host: cctx.String("nn-crawler-health-server-host"), Port: cctx.String("nn-crawler-health-server-port"), }, HTTPGateway: fxgrpc.HTTPGatewayConfig{ Host: cctx.String("nn-crawler-http-gateway-host"), Port: cctx.String("nn-crawler-http-gateway-port"), }, LivenessGateway: fxgrpc.LivenessGatewayConfig{ Host: cctx.String("nn-crawler-liveness-gateway-host"), Port: cctx.String("nn-crawler-liveness-gateway-port"), }, }, } }), ) }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.