config

package
v0.0.0-...-655ee65 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateManagerMemory = "memory"
	StateManagerRedis  = "redis"
)

Supported values for the State Manager setting

View Source
const (
	// SettingListen is the config key for the listen address
	SettingListen = "listen"
	// SettingListenDefault is the default value for the listen address
	SettingListenDefault = ":8080"

	// SettingMessageBusURI is the config key for the message bus URI
	SettingMessageBusURI = "message_bus_uri"
	// SettingMessageBusURIDefault is the default value for the message bus URI
	SettingMessageBusURIDefault = "amqp://user:password@localhost:5672//"

	// SettingStateManager is the config key for the state manager
	SettingStateManager = "state_manager"
	// SettingStateManagerDefault is the default value for the state manager
	SettingStateManagerDefault = StateManagerMemory

	// SettingRedisAddress is the config key for the redis address
	SettingRedisAddress = "redis_address"
	// SettingRedisAddressDefault is the default value for the redis address
	SettingRedisAddressDefault = "localhost:6379"

	// SettingRedisPassword is the config key for the redis password
	SettingRedisPassword = "redis_password"

	// SettingRedisDb is the config key for the redis database
	SettingRedisDb = "redis_db"
	// SettingRedisDbDefault is the default value for the redis database
	SettingRedisDbDefault = 0

	// SettingTenant is the config key for the tenant identifier
	SettingTenant = "tenant"
	// SettingTenantDefault is the default value for the tenant
	SettingTenantDefault = "default"

	// SettingSIPHeaderCaller is the SIP header used to extract identity of the caller
	SettingSIPHeaderCaller = "sip_header_caller"

	// SettingSIPHeaderCallee is the SIP header used to extract identity of the callee
	SettingSIPHeaderCallee = "sip_header_callee"

	// SettingSIPLocalDomains is a comma separated list of local domains
	SettingSIPLocalDomains = "sip_local_domains"
)

Variables

View Source
var (
	// Defaults are the default configuration settings
	Defaults = []config.Default{
		{Key: SettingListen, Value: SettingListenDefault},
		{Key: SettingMessageBusURI, Value: SettingMessageBusURIDefault},
		{Key: SettingTenant, Value: SettingTenantDefault},
		{Key: SettingStateManager, Value: SettingStateManagerDefault},
		{Key: SettingRedisAddress, Value: SettingRedisAddressDefault},
		{Key: SettingRedisDb, Value: SettingRedisDbDefault},
	}
)

Functions

func Init

func Init(configPath string) error

Init initializes the configuration from the given config file

Types

This section is empty.

Jump to

Keyboard shortcuts

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