Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Component component.ComponentConfig Database component.CockroachConfig PublicListenAddress string }
Config is the main configuration of the apigw server. It's usually populated from flags via RegisterFlags, but can also be set manually (eg. in tests).
func (*Config) RegisterFlags ¶
func (c *Config) RegisterFlags()
RegisterFlags registers the component configuration to be provided by flags. This must be called exactly once before then calling flags.Parse().
type Server ¶
type Server struct { Config Config // ListenGRPC will contain the address at which the internal gRPC server is // listening after .Start() has been called. This can differ from the configured // value if the configuration requests any port (via :0). ListenGRPC string // ListenPublic will contain the address at which the public API server is // listening after .Start() has been called. This can differ from the configured // value if the configuration requests any port (via :0). ListenPublic string }
Server runs the apigw server. It listens on two interfaces:
- Internal gRPC, which is authenticated using TLS and authorized by CA. This is to be used for internal RPCs, eg. management/debug.
- Public gRPC-Web, which is currently unauthenticated.
func (*Server) Start ¶
Start runs the two listeners of the server. The process will fail (via klog.Exit) if any of the listeners/servers fail to start.
func (*Server) WhoAmI ¶
func (s *Server) WhoAmI(ctx context.Context, req *apb.WhoAmIRequest) (*apb.WhoAmIResponse, error)
Click to show internal directories.
Click to hide internal directories.