configuration

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleEnvironmentVars

func HandleEnvironmentVars(config Config)

preparations for docker

Types

type Config

type Config = *ConfigStruct

func LoadConfig

func LoadConfig(location string) (config Config, err error)

type ConfigStruct

type ConfigStruct struct {
	KafkaUrl           string
	KafkaResponseTopic string
	KafkaGroupName     string
	FatalKafkaError    bool // "true" || "false"; "" -> "true", else -> "false"
	Protocol           string

	DeviceManagerUrl string
	DeviceRepoUrl    string

	AuthClientId             string `config:"secret"` //keycloak-client
	AuthClientSecret         string `config:"secret"` //keycloak-secret
	AuthExpirationTimeBuffer float64
	AuthEndpoint             string

	JwtPrivateKey string `config:"secret"`
	JwtExpiration int64
	JwtIssuer     string `config:"secret"`

	WebhookPort string

	GatewayLogTopic  string
	DeviceLogTopic   string
	ConnectionLogQos int

	MemcachedUrl string

	MqttBroker  string
	MqttVersion string

	CheckHub bool

	Debug     bool
	MqttDebug bool

	CorrelationExpiration int64

	IotCacheUrls             string
	DeviceExpiration         int64
	DeviceTypeExpiration     int64
	CharacteristicExpiration int64

	TokenCacheUrls       string `config:"secret"`
	TokenCacheExpiration int64

	MqttPublishAuthOnly bool

	StartupDelay int64

	Log            string
	WebhookTimeout int64

	Validate                  bool
	ValidateAllowUnknownField bool
	ValidateAllowMissingField bool

	FogHandlerTopicPrefix string

	KafkaPartitionNum      int
	KafkaReplicationFactor int

	ForceCleanSession         bool
	CleanSessionAllowUserList []string

	PublishToPostgres bool
	PostgresHost      string
	PostgresPort      int
	PostgresUser      string `config:"secret"`
	PostgresPw        string `config:"secret"`
	PostgresDb        string

	HttpCommandConsumerPort string

	AsyncPgThreadMax    int64
	AsyncFlushMessages  int64
	AsyncFlushFrequency string
	AsyncCompression    string
	SyncCompression     string

	KafkaConsumerMaxWait  string
	KafkaConsumerMinBytes int64
	KafkaConsumerMaxBytes int64

	IotCacheMaxIdleConns    int64
	CorrelationMaxIdleConns int64
	IotCacheTimeout         string
	CorrelationTimeout      string

	CommandWorkerCount int64

	DeviceTypeTopic string

	NotificationUrl string
	PermQueryUrl    string

	NotificationsIgnoreDuplicatesWithinS int
	NotificationUserOverwrite            string
	DeveloperNotificationUrl             string

	MqttErrorOnEventValidationError bool

	KafkaTopicConfigs map[string][]kafka.ConfigEntry

	MqttAuthMethod string // Whether the MQTT broker uses a username/password or client certificate authetication

	ConnectionLimitCount             int
	ConnectionLimitDurationInSeconds int

	ForceCommandSubscriptionServiceSingleLevelWildcard bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL