grpcwebproxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Port                int              `long:"port" env:"PORT" description:"Port to serve gRPC-web proxy on." default:"8443"`
	Host                string           `long:"host" env:"HOST" description:"Host to bind to." default:"0.0.0.0"`
	GracefulStopTimeout int              `long:"graceful-stop-timeout" env:"GRACEFUL_STOP_TIMEOUT" description:"Seconds to wait for graceful stop." default:"30"`
	WriteTimeout        int              `long:"write-timeout" env:"WRITE_TIMEOUT" description:"HTTP write timeout in seconds. 0 means no timeout." default:"0"`
	ReadTimeout         int              `long:"read-timeout" env:"READ_TIMEOUT" description:"HTTP read timeout in seconds. 0 means no timeout." default:"0"`
	AllowAllOrigins     bool             `long:"allow-all-origins" env:"ALLOW_ALL_ORIGINS" description:"Allow requests from any origin."`
	AllowedOrigins      []string         `long:"allowed-origins" env:"ALLOWED_ORIGINS" description:"Comma-separated list of allowed origins."`
	AllowedHeaders      []string         `long:"allowed-headers" env:"ALLOWED_HEADERS" description:"Headers allowed to propagate to backend."`
	Backend             *commongrpc.Opts `group:"Backend" namespace:"backend" env-namespace:"BACKEND"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts *Opts, certsOpts *certs.Opts, prometheusOpts *prometheus.Opts) *Server

func (*Server) GracefulStop

func (s *Server) GracefulStop() error

func (*Server) HealthCheckFn

func (s *Server) HealthCheckFn() health.Check

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop() error

func (*Server) WithLogger

func (s *Server) WithLogger(logger *slog.Logger) *Server

Jump to

Keyboard shortcuts

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