configuration

package
v1.0.10 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

View Source
var DefaultIdProvider = DefaultIdProviderImpl

Functions

func DefaultIdProviderImpl

func DefaultIdProviderImpl() string

Types

type Config

type Config struct {
	CompletionStrategy              string `json:"completion_strategy"`
	OptimisticTaskCompletionTimeout int64  `json:"optimistic_task_completion_timeout"`
	CamundaWorkerTimeout            int64  `json:"camunda_worker_timeout"`
	CamundaWorkerTasks              int64  `json:"camunda_worker_tasks"`
	CamundaFetchLockDuration        int64  `json:"camunda_fetch_lock_duration"`
	CamundaTopic                    string `json:"camunda_topic"`
	CamundaTaskResultName           string `json:"camunda_task_result_name"`

	TimescaleWrapperUrl string `json:"timescale_wrapper_url"`

	AuthExpirationTimeBuffer     float64 `json:"auth_expiration_time_buffer"`
	AuthEndpoint                 string  `json:"auth_endpoint"`
	AuthClientId                 string  `json:"auth_client_id" config:"secret"`
	AuthUserName                 string  `json:"auth_user_name" config:"secret"`
	AuthPassword                 string  `json:"auth_password" config:"secret"`
	Debug                        bool    `json:"debug"`
	SubResultExpirationInSeconds int32   `json:"sub_result_expiration_in_seconds"`
	SequentialGroups             bool    `json:"sequential_groups"`
	CamundaUrl                   string  `json:"camunda_url"`

	MqttBroker          string `json:"mqtt_broker"`
	MqttResponseTopic   string `json:"mqtt_response_topic"`
	CorrelationIdPrefix string `json:"correlation_id_prefix"`
	DeviceRepoUrl       string `json:"device_repo_url"`
	PermissionsUrl      string `json:"permissions_url"`
	FallbackFile        string `json:"fallback_file"`

	ProtocolHandler string `json:"protocol_handler"`
	ProtocolSegment string `json:"protocol_segment"`

	MgwConceptRepoRefreshInterval int64 `json:"mgw_concept_repo_refresh_interval"`

	//optional; use if running as standalone; dont use if running with https://github.com/SENERGY-Platform/senergy-connector
	SyncMqttBroker           string `json:"sync_mqtt_broker"`
	SyncNetworkId            string `json:"sync_network_id"`
	SyncConnectRetryInterval string `json:"sync_connect_retry_interval"`
}

func Load

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

loads config from json in location and used environment variables (e.g ZookeeperUrl --> ZOOKEEPER_URL)

Jump to

Keyboard shortcuts

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