Documentation ¶
Index ¶
Constants ¶
View Source
const ( JetStreamBackend = "JetStream" EventMeshBackend = "EventMesh" )
View Source
const JetStreamSubjectPrefix = "kyma"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveBackend ¶
type ActiveBackend string
type EventMeshConfig ¶
type EventMeshConfig struct { Port int `default:"8080" envconfig:"INGRESS_PORT"` ClientID string `envconfig:"CLIENT_ID" required:"true"` ClientSecret string `envconfig:"CLIENT_SECRET" required:"true"` TokenEndpoint string `envconfig:"TOKEN_ENDPOINT" required:"true"` EventMeshPublishURL string `envconfig:"EMS_PUBLISH_URL" required:"true"` MaxIdleConns int `default:"100" envconfig:"MAX_IDLE_CONNS"` MaxIdleConnsPerHost int `default:"2" envconfig:"MAX_IDLE_CONNS_PER_HOST"` RequestTimeout time.Duration `default:"5s" envconfig:"REQUEST_TIMEOUT"` // EventMeshNamespace is the name of the namespace in EventMesh which is used as the event source for legacy events. EventMeshNamespace string `envconfig:"BEB_NAMESPACE" required:"true"` // EventTypePrefix is the prefix of each event as per the eventing specification. // It follows the eventType format: <eventTypePrefix>.<appName>.<event-name>.<version> EventTypePrefix string `default:"" envconfig:"EVENT_TYPE_PREFIX"` ApplicationCRDEnabled bool `default:"true" envconfig:"APPLICATION_CRD_ENABLED"` }
EventMeshConfig represents the environment config for the Event Publisher to EventMesh.
func (*EventMeshConfig) ConfigureTransport ¶
func (c *EventMeshConfig) ConfigureTransport(transport *http.Transport)
ConfigureTransport receives an HTTP transport and configure its max idle connection properties.
func (*EventMeshConfig) String ¶
func (c *EventMeshConfig) String() string
String implements the fmt.Stringer interface.
type NATSConfig ¶
type NATSConfig struct { Port int `default:"8080" envconfig:"INGRESS_PORT"` URL string `envconfig:"NATS_URL" required:"true"` RetryOnFailedConnect bool `default:"true" envconfig:"RETRY_ON_FAILED_CONNECT"` MaxReconnects int `default:"-1" envconfig:"MAX_RECONNECTS"` // Negative means keep try reconnecting. ReconnectWait time.Duration `default:"5s" envconfig:"RECONNECT_WAIT"` RequestTimeout time.Duration `default:"5s" envconfig:"REQUEST_TIMEOUT"` ApplicationCRDEnabled bool `default:"true" envconfig:"APPLICATION_CRD_ENABLED"` // Legacy Namespace is used as the event source for legacy events LegacyNamespace string `default:"kyma" envconfig:"LEGACY_NAMESPACE"` // EventTypePrefix is the prefix of each event as per the eventing specification // It follows the eventType format: <eventTypePrefix>.<appName>.<event-name>.<version> EventTypePrefix string `default:"kyma" envconfig:"EVENT_TYPE_PREFIX"` // JetStream-specific configs JSStreamName string `default:"kyma" envconfig:"JS_STREAM_NAME"` }
NATSConfig represents the environment config for the Event Publisher to NATS.
func (*NATSConfig) String ¶
func (c *NATSConfig) String() string
String implements the fmt.Stringer interface.
func (*NATSConfig) ToConfig ¶
func (c *NATSConfig) ToConfig() *EventMeshConfig
ToConfig converts to a default EventMeshConfig.
Click to show internal directories.
Click to hide internal directories.