server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SecureAddr         string
	PlaintextAddr      string
	APIDomain          string
	CACertFile         string
	CertFile           string
	KeyFile            string
	EnableCORS         bool
	CORSOriginHost     string
	CORSAllowSubdomain bool
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) GRPCServerOption

func (s *Config) GRPCServerOption(opt ...grpc.ServerOption)

func (*Config) GatewayMuxOption

func (s *Config) GatewayMuxOption(opt ...gwrt.ServeMuxOption)

func (Config) New

func (c Config) New() (*Server, error)

func (*Config) SetCORSRegistry

func (s *Config) SetCORSRegistry(reg cors.PatternRegistry)

func (*Config) SetGRPCRegistry

func (s *Config) SetGRPCRegistry(reg endpoints.GRPCRegistry)

func (*Config) SetProxyRegistry

func (s *Config) SetProxyRegistry(reg endpoints.ProxyRegistry)

func (*Config) UseTLS

func (s *Config) UseTLS() bool

type Server

type Server struct {
	Config
}

func (*Server) NewGatewayMux

func (s *Server) NewGatewayMux(l net.Listener, useTLS bool) *gwrt.ServeMux

func (*Server) Run

func (s *Server) Run(stopCh <-chan struct{}) error

func (*Server) ServeHTTPS

func (s *Server) ServeHTTPS()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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