Documentation
¶
Overview ¶
Package httpgateway_server provides the http gateway.
Index ¶
- Variables
- type Config
- type Option
- type Server
- func (s *Server) Add(routes *httpgateway_v1.Routes) error
- func (s *Server) Remove(paths *httpgateway_v1.Paths) error
- func (s *Server) Set(routes *httpgateway_v1.Routes) error
- func (s *Server) Start(_ context.Context) error
- func (s *Server) Stop(ctx context.Context) error
- func (s *Server) String() string
- func (s *Server) Type() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultAddress is the default Address to listen to. DefaultAddress = ":8080" // DefaultConfigSection is the section key used in config files used to // configure the gateway options. DefaultConfigSection = "httpgateway" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `json:"enabled" yaml:"enabled"` Address string `json:"address" yaml:"address"` }
Config represents the config for the httpgateway.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a component implementing the http gateway.
func Provide ¶
func Provide( svcCtx *cli.ServiceContextWithConfig, components *types.Components, logger log.Logger, client client.Type, ) (*Server, error)
Provide provides the httpgateway component.
func (*Server) Add ¶
func (s *Server) Add(routes *httpgateway_v1.Routes) error
Add adds the given routes to the gateway if there is no such route.
func (*Server) Remove ¶
func (s *Server) Remove(paths *httpgateway_v1.Paths) error
Remove removes the given routes from the gateway.
func (*Server) Set ¶
func (s *Server) Set(routes *httpgateway_v1.Routes) error
Set sets the given routes by path on the gateway.
Click to show internal directories.
Click to hide internal directories.