Documentation ¶
Overview ¶
Package commands implements the commands for the ttn-lw-stack binary.
Index ¶
- Variables
- func NewComponentDeviceRegistryRedis(conf Config, name string) *redis.Client
- func NewNetworkServerApplicationUplinkQueueRedis(conf Config) *redis.Client
- func NewNetworkServerDeviceRegistryRedis(conf Config) *redis.Client
- func NewNetworkServerDownlinkTaskRedis(conf Config) *redis.Client
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ ServiceBase: shared.DefaultServiceBase, IS: shared_identityserver.DefaultIdentityServerConfig, GS: shared_gatewayserver.DefaultGatewayServerConfig, NS: shared_networkserver.DefaultNetworkServerConfig, AS: shared_applicationserver.DefaultApplicationServerConfig, JS: shared_joinserver.DefaultJoinServerConfig, Console: shared_console.DefaultConsoleConfig, GCS: shared_gatewayconfigurationserver.DefaultGatewayConfigurationServerConfig, DTC: shared_devicetemplateconverter.DefaultDeviceTemplateConverterConfig, QRG: shared_qrcodegenerator.DefaultQRCodeGeneratorConfig, PBA: shared_packetbrokeragent.DefaultPacketBrokerAgentConfig, OutputFormat: "json", }
DefaultConfig contains the default config for the ttn-lw-stack binary.
View Source
var ( // Root command is the entrypoint of the program Root = &cobra.Command{ Use: name, SilenceErrors: true, SilenceUsage: true, Short: "The Things Stack for LoRaWAN", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { err := mgr.ReadInConfig() if err != nil { return err } if err = mgr.Unmarshal(config); err != nil { return err } if err := shared.InitializeFallbacks(&config.ServiceBase); err != nil { return err } logger = log.NewLogger( log.WithLevel(config.Base.Log.Level), log.WithHandler(log.NewCLI(os.Stdout)), ) logger.Use(logobservability.New()) if config.Sentry.DSN != "" { opts := sentry.ClientOptions{ Dsn: config.Sentry.DSN, Release: pkgversion.String(), } if hostname, err := os.Hostname(); err == nil { opts.ServerName = hostname } err = sentry.Init(opts) if err != nil { return err } logger.Use(logsentry.New()) } ctx = log.NewContext(ctx, logger) return nil }, } )
Functions ¶
func NewComponentDeviceRegistryRedis ¶ added in v3.9.3
func NewNetworkServerApplicationUplinkQueueRedis ¶ added in v3.9.3
func NewNetworkServerDeviceRegistryRedis ¶ added in v3.9.3
func NewNetworkServerDownlinkTaskRedis ¶ added in v3.9.3
Types ¶
type Config ¶
type Config struct { conf.ServiceBase `name:",squash"` IS identityserver.Config `name:"is"` GS gatewayserver.Config `name:"gs"` NS networkserver.Config `name:"ns"` AS applicationserver.Config `name:"as"` JS joinserver.Config `name:"js"` Console console.Config `name:"console"` GCS gatewayconfigurationserver.Config `name:"gcs"` DTC devicetemplateconverter.Config `name:"dtc"` QRG qrcodegenerator.Config `name:"qrg"` PBA packetbrokeragent.Config `name:"pba"` OutputFormat string `name:"output-format" yaml:"output-format" description:"Output format"` }
Config for the ttn-lw-stack binary.
Click to show internal directories.
Click to hide internal directories.