Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoSetMemoryLimit ¶
func AutoSetMemoryLimit() uint64
AutoSetMemoryLimit rileva automaticamente il limite di memoria del container e imposta il GC memory limit (Go 1.19+). Se non trova limiti, non fa nulla.
Types ¶
type BrokerConfiguration ¶
type BrokerConfiguration struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
Type string `json:"type" mapstructure:"type"`
Nats NatsConfiguration `json:"nats" mapstructure:"nats"`
Kafka KafkaConfiguration `json:"kafka" mapstructure:"kafka"`
RabbitMQ RabbitMQConfiguration `json:"rabbitmq" mapstructure:"rabbitmq"`
}
type Configuration ¶
type Configuration struct {
Port int `json:"port" mapstructure:"port"`
LogLevel string `json:"logLevel" mapstructure:"logLevel"`
Broker BrokerConfiguration `json:"broker" mapstructure:"broker"`
Database DatabaseConfiguration `json:"database" mapstructure:"database"`
}
type DatabaseConfiguration ¶
type DatabaseConfiguration struct {
User string `json:"user" mapstructure:"user"`
Password string `json:"password" mapstructure:"password"`
Host string `json:"host" mapstructure:"host"`
Port int `json:"port" mapstructure:"port"`
Name string `json:"name" mapstructure:"name"`
SSLMode string `json:"sslMode" mapstructure:"sslMode"`
TimeZone string `json:"timezone" mapstructure:"timezone"`
}
type KafkaConfiguration ¶
type KafkaConfiguration struct {
Name string `json:"name" mapstructure:"name"`
Brokers string `json:"brokers" mapstructure:"brokers"`
Topic string `json:"topic" mapstructure:"topic"`
GroupID string `json:"groupId" mapstructure:"groupId"`
ClientID string `json:"clientId" mapstructure:"clientId"`
Username string `json:"username" mapstructure:"username"`
Password string `json:"password" mapstructure:"password"`
Subscriptions []KafkaSubscriptionConfiguration `json:"subscriptions" mapstructure:"subscriptions"`
ConnectTimeoutSeconds int `json:"connectTimeoutSeconds" mapstructure:"connectTimeoutSeconds"`
CommitIntervalSeconds int `json:"commitIntervalSeconds" mapstructure:"commitIntervalSeconds"`
}
type NatsConfiguration ¶
type NatsConfiguration struct {
Name string `json:"name" mapstructure:"name"`
URL string `json:"url" mapstructure:"url"`
Username string `json:"username" mapstructure:"username"`
Password string `json:"password" mapstructure:"password"`
Topic string `json:"topic" mapstructure:"topic"`
Stream string `json:"stream" mapstructure:"stream"`
DurableConsumer string `json:"durableConsumer" mapstructure:"durableConsumer"`
QueueGroup string `json:"queueGroup" mapstructure:"queueGroup"`
Subscriptions []NatsSubscriptionConfiguration `json:"subscriptions" mapstructure:"subscriptions"`
ConnectTimeoutSeconds int `json:"connectTimeoutSeconds" mapstructure:"connectTimeoutSeconds"`
AckWaitSeconds int `json:"ackWaitSeconds" mapstructure:"ackWaitSeconds"`
}
type NatsSubscriptionConfiguration ¶
type NatsSubscriptionConfiguration struct {
Name string `json:"name" mapstructure:"name"`
Topic string `json:"topic" mapstructure:"topic"`
Stream string `json:"stream" mapstructure:"stream"`
DurableConsumer string `json:"durableConsumer" mapstructure:"durableConsumer"`
QueueGroup string `json:"queueGroup" mapstructure:"queueGroup"`
}
type RabbitMQConfiguration ¶
type RabbitMQConfiguration struct {
Name string `json:"name" mapstructure:"name"`
URL string `json:"url" mapstructure:"url"`
Queue string `json:"queue" mapstructure:"queue"`
Exchange string `json:"exchange" mapstructure:"exchange"`
ExchangeType string `json:"exchangeType" mapstructure:"exchangeType"`
RoutingKey string `json:"routingKey" mapstructure:"routingKey"`
ConsumerTag string `json:"consumerTag" mapstructure:"consumerTag"`
Subscriptions []RabbitMQSubscriptionConfiguration `json:"subscriptions" mapstructure:"subscriptions"`
PrefetchCount int `json:"prefetchCount" mapstructure:"prefetchCount"`
}
type RabbitMQSubscriptionConfiguration ¶
type RabbitMQSubscriptionConfiguration struct {
Name string `json:"name" mapstructure:"name"`
Queue string `json:"queue" mapstructure:"queue"`
Exchange string `json:"exchange" mapstructure:"exchange"`
RoutingKey string `json:"routingKey" mapstructure:"routingKey"`
ConsumerTag string `json:"consumerTag" mapstructure:"consumerTag"`
}
Click to show internal directories.
Click to hide internal directories.