Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInitializeBaseComponent = errors.Define("initialize_base_component", "could not initialize base component") ErrInvalidLogFormat = errors.DefineInvalidArgument("log_format", "invalid log format `{format}`") ErrInitializeLogger = errors.Define("initialize_logger", "could not initialize logger") ErrInitializeIdentityServer = errors.Define("initialize_identity_server", "could not initialize Identity Server") ErrInitializeGatewayServer = errors.Define("initialize_gateway_server", "could not initialize Gateway Server") ErrInitializeNetworkServer = errors.Define("initialize_network_server", "could not initialize Network Server") ErrInitializeApplicationServer = errors.Define("initialize_application_server", "could not initialize Application Server") ErrInitializeJoinServer = errors.Define("initialize_join_server", "could not initialize Join Server") ErrInitializeConsole = errors.Define("initialize_console", "could not initialize Console") ErrInitializeGatewayConfigurationServer = errors.Define("initialize_gateway_configuration_server", "could not initialize Gateway Configuration Server") ErrInitializeDeviceTemplateConverter = errors.Define("initialize_device_template_converter", "could not initialize Device Template Converter") ErrInitializeQRCodeGenerator = errors.Define("initialize_qr_code_generator", "could not initialize QR Code Generator") ErrInitializePacketBrokerAgent = errors.Define("initialize_packet_broker_agent", "could not initialize Packet Broker Agent") ErrInitializeDeviceRepository = errors.Define("initialize_device_repository", "could not initialize Device Repository") ErrInitializeDeviceClaimingServer = errors.Define("initialize_device_claiming_server", "could not initialize Device Claiming Server") )
Errors returned by component initialization.
var DefaultAssetsBaseURL = DefaultHTTPConfig.Static.Mount
DefaultAssetsBaseURL is the default public URL where the assets are served.
var DefaultBaseConfig = config.Base{ Log: DefaultLogConfig, }
DefaultBaseConfig is the default base component configuration.
var DefaultBlobConfig = config.BlobConfig{ Provider: "local", Local: config.BlobConfigLocal{ Directory: "./public/blob", }, }
DefaultBlobConfig is the default config for the blob store.
var DefaultCacheConfig = config.Cache{ Redis: DefaultRedisConfig, }
DefaultCacheConfig is the default cache configuration.
var DefaultClusterConfig = cluster.Config{}
DefaultClusterConfig is the default cluster configuration.
var DefaultConsolePublicURL = DefaultPublicURL + "/console"
DefaultConsolePublicURL is the default public URL where the Console is served.
var DefaultEventsConfig = func() config.Events { c := config.Events{ Backend: "internal", } c.Redis.Config = DefaultRedisConfig c.Redis.Store.TTL = 10 * time.Minute c.Redis.Store.EntityTTL = 24 * time.Hour c.Redis.Store.EntityCount = 100 c.Redis.Store.CorrelationIDCount = 100 c.Redis.Workers = 16 c.Redis.Publish.QueueSize = 8192 c.Redis.Publish.MaxWorkers = 1024 return c }()
DefaultEventsConfig is the default config for Events.
var DefaultFrequencyPlansConfig = config.FrequencyPlansConfig{
Directory: "/srv/ttn-lorawan/lorawan-frequency-plans",
URL: "https://raw.githubusercontent.com/TheThingsNetwork/lorawan-frequency-plans/master",
}
DefaultFrequencyPlansConfig is the default config to retrieve frequency plans.
var DefaultGRPCConfig = config.GRPC{ Listen: ":1884", ListenTLS: ":8884", TrustedProxies: []string{"127.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "172.16.0.0/12", "192.168.0.0/16"}, }
DefaultGRPCConfig is the default config for GRPC.
var DefaultHTTPConfig = config.HTTP{ Listen: ":1885", ListenTLS: ":8885", TrustedProxies: []string{"127.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "172.16.0.0/12", "192.168.0.0/16"}, Static: config.HTTPStaticConfig{ Mount: "/assets", SearchPath: []string{"public", "/srv/ttn-lorawan/public"}, }, PProf: config.PProf{ Enable: true, }, Metrics: config.Metrics{ Enable: true, }, Health: config.Health{ Enable: true, }, }
DefaultHTTPConfig is the default HTTP config.
var DefaultInteropServerConfig = config.InteropServer{ Listen: ":1886", ListenTLS: ":8886", PacketBroker: config.PacketBrokerInteropAuth{ Enabled: false, TokenIssuer: packetbroker.DefaultTokenIssuer, }, }
DefaultInteropServerConfig is the default interop server config.
var DefaultKeyVaultConfig = config.KeyVault{
Provider: "static",
}
DefaultKeyVaultConfig is the default config for key vaults.
var DefaultLogConfig = config.Log{ Format: "console", Level: log.InfoLevel, }
DefaultLogConfig is the default log configuration.
var DefaultOAuthPublicURL = DefaultPublicURL + "/oauth"
DefaultOAuthPublicURL is the default URL where the OAuth API as well as OAuth and Account application frontend is served.
var DefaultPublicHost = "localhost"
DefaultPublicHost is the default public host where The Things Stack is served.
var DefaultPublicURL = "http://" + DefaultPublicHost + ":1885"
DefaultPublicURL is the default public URL where The Things Stack is served.
var DefaultRedisConfig = redis.Config{ Address: "localhost:6379", Database: 0, RootNamespace: []string{"ttn", "v3"}, }
DefaultRedisConfig is the default config for Redis.
var DefaultRightsConfig = config.Rights{ TTL: 2 * time.Minute, }
DefaultRightsConfig is the default config to fetch rights from the Identity Server.
var DefaultServiceBase = config.ServiceBase{ Base: DefaultBaseConfig, Cluster: DefaultClusterConfig, Cache: DefaultCacheConfig, Redis: DefaultRedisConfig, Events: DefaultEventsConfig, GRPC: DefaultGRPCConfig, HTTP: DefaultHTTPConfig, Interop: DefaultInteropServerConfig, TLS: DefaultTLSConfig, Blob: DefaultBlobConfig, FrequencyPlans: DefaultFrequencyPlansConfig, Rights: DefaultRightsConfig, KeyVault: DefaultKeyVaultConfig, }
DefaultServiceBase is the default base config for a service.
var DefaultTLSConfig = tlsconfig.Config{ ServerAuth: tlsconfig.ServerAuth{ Certificate: "cert.pem", Key: "key.pem", ACME: tlsconfig.ACME{ Endpoint: acme.LetsEncryptURL, }, }, }
DefaultTLSConfig is the default TLS config.
Functions ¶
func InitializeEvents ¶
InitializeEvents initializes the event system.
func InitializeFallbacks ¶ added in v3.9.2
func InitializeFallbacks(conf *config.ServiceBase) error
InitializeFallbacks initializes configuration fallbacks.