Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCGatewayGeneratedHandlers ¶
GRPCGatewayGeneratedHandlers alias for gRPC-gateway endpoint registrations
type GRPCGatewayInterceptor ¶
GRPCGatewayInterceptor alias for gRPC-gateway interceptor
type GRPCServerAPI ¶
GRPCServerAPI alias for gRPC API function registration
type GRPCWebServiceBuilder ¶
type GRPCWebServiceBuilder interface { ListenOn(addr string) GRPCWebServiceBuilder SetTlsConfig(enableTls bool, CaCertFile string, ServerKeyFile string, ServerCertFile string) GRPCWebServiceBuilder SetCustomGRPCServer(customServer *grpc.Server) GRPCWebServiceBuilder SetCustomListener(listener net.Listener) GRPCWebServiceBuilder RegisterGRPCAPIs(register ...GRPCServerAPI) GRPCWebServiceBuilder AddGRPCServerOptions(options ...grpc.ServerOption) GRPCWebServiceBuilder SetPanicHandler(handler func(interface{}) error) GRPCWebServiceBuilder SetLogger(logger func(ctx context.Context, format string, args ...interface{})) GRPCWebServiceBuilder AddRESTServerConfiguration() RESTBuilder Build() (WebService, error) }
GRPCWebServiceBuilder defines gRPC web service builder options
type ListenInfo ¶
type ListenInfo struct { Address string `json:"address"` Port int `json:"port"` Type WebServerType `json:"type"` }
ListenInfo defines port info
type RESTBuilder ¶
type RESTBuilder interface { ListenOn(addr string) RESTBuilder SetCustomServer(customServer *http.Server) RESTBuilder SetCustomListener(listener net.Listener) RESTBuilder AddHandler(pattern string, handler http.Handler) RESTBuilder AddHandlerFunc(pattern string, handlerFunc http.HandlerFunc) RESTBuilder SetCustomGRPCGatewayMux(mux *runtime.ServeMux) RESTBuilder RegisterGRPCGatewayHandlers(handlers ...GRPCGatewayGeneratedHandlers) RESTBuilder AddGRPCGatewayOptions(options ...runtime.ServeMuxOption) RESTBuilder AddGRPCGatewayInterceptors(interceptors ...GRPCGatewayInterceptor) RESTBuilder BuildRESTPart() GRPCWebServiceBuilder }
RESTBuilder defines REST web service builder options
type TlsConfig ¶
type TlsConfig struct { EnableTLS bool `json:"enableTLS"` CaCertFile string `json:"caCertFile"` ServerKeyFile string `json:"serverKeyFile"` ServerCertFile string `json:"serverCertFile"` }
TlsConfig defines tls configuration
type WebServerType ¶
type WebServerType string
WebServerType string enum
const ( // GRPCServer type GRPCServer WebServerType = "GRPC" // RESTServer type RESTServer WebServerType = "REST" )
type WebService ¶
type WebService interface { Run(ctx context.Context) error Stop(ctx context.Context) error Ports() []ListenInfo TlsConfig() *TlsConfig }
WebService defines our web service functions
Click to show internal directories.
Click to hide internal directories.