Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { GRPC grpc.Config `group:"grpc api" namespace:"grpc"` GRPCUI GRPCUIConfig `group:"grpc web ui" namespace:"grpcui"` REST RESTConfig `group:"rest api" namespace:"rest"` Gateway GatewayConfig `group:"gateway" namespace:"grpcui"` ListenAddress string `description:"the IP address that our sever will listen on" long:"listen-address"` ListenPort uint16 `description:"the port that our sever will listen on" long:"listen-port"` }
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type GRPCUIConfig ¶
type GRPCUIConfig struct { Enabled encoding.Bool `long:"enabled"` Endpoint string `long:"endpoint"` Level encoding.LogLevel `` /* 152-byte string literal not displayed */ MaxPayloadSize encoding.ByteSize `description:"Maximum size of GRPC messages the UI will accept from the GRPC server (e.g. 4mb)" long:"max-payload-size"` }
func NewDefaultGRPCUIConfig ¶
func NewDefaultGRPCUIConfig() GRPCUIConfig
type GRPCUIHandler ¶
type GRPCUIHandler struct { GRPCUIConfig // contains filtered or unexported fields }
func NewGRPCUIHandler ¶
func NewGRPCUIHandler(log *logging.Logger, dialer grpcDialer, config GRPCUIConfig) *GRPCUIHandler
func (*GRPCUIHandler) Name ¶
func (g *GRPCUIHandler) Name() string
func (*GRPCUIHandler) ServeHTTP ¶
func (g *GRPCUIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*GRPCUIHandler) Start ¶
func (g *GRPCUIHandler) Start() error
type Gateway ¶
type Gateway struct { GatewayConfig // contains filtered or unexported fields }
func NewGateway ¶
func NewGateway(log *logging.Logger, config GatewayConfig) *Gateway
func (*Gateway) Register ¶
func (s *Gateway) Register(handler GatewayHandler, endpoint string)
type GatewayConfig ¶
type GatewayConfig struct {
CORS libhttp.CORSConfig `description:"CORS allowed origins" long:"cors"`
}
func NewDefaultGatewayConfig ¶
func NewDefaultGatewayConfig() GatewayConfig
type GatewayHandler ¶
type NotStarted ¶
type NotStarted struct {
// contains filtered or unexported fields
}
func NewNotStartedHandler ¶
func NewNotStartedHandler(name string) *NotStarted
func (*NotStarted) ServeHTTP ¶
func (n *NotStarted) ServeHTTP(w http.ResponseWriter, req *http.Request)
type Portal ¶
type Portal struct { Config // contains filtered or unexported fields }
func (*Portal) GRPCListener ¶
func (*Portal) GatewayListener ¶
type RESTConfig ¶
type RESTConfig struct { Level encoding.LogLevel `choice:"debug" choice:"info" choice:"warning" long:"log-level"` Enabled encoding.Bool `long:"enabled"` Endpoint string `long:"endpoint"` }
func NewDefaultRESTConfig ¶
func NewDefaultRESTConfig() RESTConfig
type RESTHandler ¶
type RESTHandler struct { RESTConfig // contains filtered or unexported fields }
Handler implement a rest server acting as a proxy to the grpc api.
func NewRESTHandler ¶
func NewRESTHandler(log *logging.Logger, dialer grpcDialer, config RESTConfig) *RESTHandler
func (*RESTHandler) Name ¶
func (r *RESTHandler) Name() string
func (*RESTHandler) ServeHTTP ¶
func (r *RESTHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*RESTHandler) Start ¶
func (r *RESTHandler) Start() error
Click to show internal directories.
Click to hide internal directories.