Documentation ¶
Index ¶
- Constants
- func ConnectivityCheck(c *config.EventGatewayConfig) error
- func GenerateHealthCheckCredentials(c *config.EventGatewayConfig) error
- func ReadHealthCheckCredentials(c *config.EventGatewayConfig) (string, error)
- func ServerWithNATSConfig(opts ...NATSdConfigurator) (*natsd.Server, error)
- func Spawn(c *config.EventGatewayConfig) error
- type NATSdConfigurator
- func WithNATSA2AuthIntegration(c *config.EventGatewayConfig) NATSdConfigurator
- func WithNATSFrontEndCerts(c *config.EventGatewayConfig) NATSdConfigurator
- func WithNATSGateway(c *config.EventGatewayConfig) NATSdConfigurator
- func WithNATSHTTPMonitoringDisabled(c *config.EventGatewayConfig) NATSdConfigurator
- func WithNATSListenOpts(c *config.EventGatewayConfig) NATSdConfigurator
- func WithNATSLogging(c *config.EventGatewayConfig) NATSdConfigurator
Constants ¶
const HealthCheckTokenPrefix = "HEALTHCHECK-"
const PRNCount = 20
Variables ¶
This section is empty.
Functions ¶
func ConnectivityCheck ¶
func ConnectivityCheck(c *config.EventGatewayConfig) error
func GenerateHealthCheckCredentials ¶
func GenerateHealthCheckCredentials(c *config.EventGatewayConfig) error
func ReadHealthCheckCredentials ¶
func ReadHealthCheckCredentials(c *config.EventGatewayConfig) (string, error)
func ServerWithNATSConfig ¶
func ServerWithNATSConfig(opts ...NATSdConfigurator) (*natsd.Server, error)
ServerWithNATSConfig configures an embedded NATS server with a custom set of NATS config options. It's intended to be used in tests where we want to test some aspect of the system without needing all of Automate running
func Spawn ¶
func Spawn(c *config.EventGatewayConfig) error
Spawn starts an embedded NATS server with all the Automate integrations enabled.
Types ¶
type NATSdConfigurator ¶
NATSdConfigurator is a functional-options-pattern function that configures the NATS server.
func WithNATSA2AuthIntegration ¶
func WithNATSA2AuthIntegration(c *config.EventGatewayConfig) NATSdConfigurator
WithA2Auth returns a NATSdConfigurator that configures the NATS server to use A2's authN and authZ
func WithNATSFrontEndCerts ¶
func WithNATSFrontEndCerts(c *config.EventGatewayConfig) NATSdConfigurator
WithNATSFrontEndCerts returns a NATSdConfigurator that configures the NATS server to use the frontend TLS certs set on the EventGatewayConfig. Multiple certificates can be used; WithNATSFrontEndCerts will call tls.Config.BuildNameToCertificate() so that server name indication (SNI) will work.
func WithNATSGateway ¶
func WithNATSGateway(c *config.EventGatewayConfig) NATSdConfigurator
WithNATSGateway returns a NATSdConfigurator that configures the NATS server to use the NATS gateway feature to connect to the internal event service.
func WithNATSHTTPMonitoringDisabled ¶
func WithNATSHTTPMonitoringDisabled(c *config.EventGatewayConfig) NATSdConfigurator
WithNATSHTTPMonitoringDisabled disables the HTTP(S) monitoring servers in NATS.
func WithNATSListenOpts ¶
func WithNATSListenOpts(c *config.EventGatewayConfig) NATSdConfigurator
WithNATSListenOpts returns a NATSdConfigurator that sets the listen host and port as set in the EventGatewayConfig
func WithNATSLogging ¶
func WithNATSLogging(c *config.EventGatewayConfig) NATSdConfigurator
WithNATSLogging returns a NATSdConfigurator that makes NATS log in a way that kinda matches the log level set in the EventGatewayConfig. It only "kinda" matches because NATS only lets us turn debug and trace logging on or off, so we turn them both on for debug and off for log level info and higher.