Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RootCmd = &cobra.Command{ Use: "syncer", Short: "Tool listening for changes from Arweave nodes", PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) { applicationCtx, applicationCtxCancel = context.WithCancel(context.Background()) signalChannel = make(chan os.Signal, 1) signal.Notify(signalChannel, os.Interrupt, syscall.SIGTERM) conf, err = config.Load(cfgFile) if err != nil { return } go func() { select { case <-signalChannel: applicationCtxCancel() case <-applicationCtx.Done(): } }() err = logger.Init(conf) if err != nil { return } return }, PersistentPostRunE: func(cmd *cobra.Command, args []string) (err error) { defer func() { signal.Stop(signalChannel) applicationCtxCancel() }() <-applicationCtx.Done() return }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.