Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInitializeBaseComponent = errors.Define("initialize_base_component", "could not initialize base component") 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") )
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 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 DefaultDeviceRepositoryConfig = config.DeviceRepositoryConfig{}
DefaultDeviceRepositoryConfig is the default config to retrieve device blueprints.
var DefaultEventsConfig = config.Events{
Backend: "internal",
}
DefaultEventsConfig is the default config for Events.
var DefaultFrequencyPlansConfig = config.FrequencyPlansConfig{
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{
ListenTLS: ":8886",
}
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{ Level: log.InfoLevel, }
DefaultLogConfig is the default log configuration.
var DefaultOAuthPublicURL = DefaultPublicURL + "/oauth"
DefaultOAuthPublicURL is the default public URL where OAuth 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, Redis: DefaultRedisConfig, Events: DefaultEventsConfig, GRPC: DefaultGRPCConfig, HTTP: DefaultHTTPConfig, Interop: DefaultInteropServerConfig, TLS: DefaultTLSConfig, Blob: DefaultBlobConfig, FrequencyPlans: DefaultFrequencyPlansConfig, DeviceRepository: DefaultDeviceRepositoryConfig, 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 ¶
func InitializeEvents(ctx context.Context, taskStarter component.TaskStarter, conf config.ServiceBase) error
InitializeEvents initializes the event system.
func InitializeFallbacks ¶ added in v3.9.2
func InitializeFallbacks(conf *config.ServiceBase) error
Initialize configuration fallbacks.
Types ¶
This section is empty.