Skip to content

Commit

Permalink
Near total re-write of LoadConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Jan 8, 2025
1 parent f683096 commit 0b11e66
Show file tree
Hide file tree
Showing 18 changed files with 1,298 additions and 343 deletions.
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type KhedraApp struct {
}

func NewKhedraApp() *KhedraApp {
cfg, _, err := LoadConfig()
cfg, err := LoadConfig()
if err != nil {
log.Fatalf("failed to load config: %v", err)
}
Expand Down Expand Up @@ -100,7 +100,7 @@ type App struct {
Monitor OnOff
Sleep int
BlockCnt int
LogLevel slog.Level
Level slog.Level
}
// NewApp creates a new App instance with the default values.
Expand All @@ -110,10 +110,10 @@ func NewApp() *App {
blockCnt = int(base.MustParseUint64(bc))
}
customLogger, logLevel := NewCustomLogger()
custom Logger, level := NewCustomLogger()
app := &App{
Logger: customLogger,
LogLevel: logLevel,
Logger: custom Logger,
Level: level,
Sleep: 6,
Scrape: Off,
Api: Off,
Expand Down
4 changes: 2 additions & 2 deletions app/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Environment:
-------------
You MUST export the following values to the environment:
TB_NODE_DATADIR: A directory to store the indexer's data (required, created if necessary)
TB_NODE_DATAFOLDER: A directory to store the indexer's data (required, created if necessary)
TB_NODE_MAINNETRPC: A valid RPC endpoint for Ethereum mainnet (required)
You MAY also export these environment variables:
Expand All @@ -259,4 +259,4 @@ You MAY also export these environment variables:
(example: TB_NODE_SEPOLIARPC=http://localhost:8548)
You may put these values in a .env file in the current folder. See env.example.`
*/
*/
Loading

0 comments on commit 0b11e66

Please sign in to comment.