Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
e77efb38
Unverified
Commit
e77efb38
authored
Aug 24, 2023
by
OptimismBot
Committed by
GitHub
Aug 24, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6994 from ethereum-optimism/08-23-feat_indexer_add_indexer_all_command
feat(indexer): add indexer all command
parents
a9792032
cc93b709
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
cli.go
indexer/cmd/indexer/cli.go
+18
-0
No files found.
indexer/cmd/indexer/cli.go
View file @
e77efb38
...
@@ -76,6 +76,18 @@ func runApi(ctx *cli.Context) error {
...
@@ -76,6 +76,18 @@ func runApi(ctx *cli.Context) error {
return
api
.
Listen
(
apiCtx
,
cfg
.
API
.
Port
)
return
api
.
Listen
(
apiCtx
,
cfg
.
API
.
Port
)
}
}
func
runAll
(
ctx
*
cli
.
Context
)
error
{
// Run the indexer
go
func
()
{
if
err
:=
runIndexer
(
ctx
);
err
!=
nil
{
log
.
NewLogger
(
log
.
ReadCLIConfig
(
ctx
))
.
Error
(
"Error running the indexer"
,
"err"
,
err
)
}
}()
// Run the API and return its error, if any
return
runApi
(
ctx
)
}
func
newCli
(
GitCommit
string
,
GitDate
string
)
*
cli
.
App
{
func
newCli
(
GitCommit
string
,
GitDate
string
)
*
cli
.
App
{
flags
:=
[]
cli
.
Flag
{
ConfigFlag
}
flags
:=
[]
cli
.
Flag
{
ConfigFlag
}
flags
=
append
(
flags
,
log
.
CLIFlags
(
"INDEXER"
)
...
)
flags
=
append
(
flags
,
log
.
CLIFlags
(
"INDEXER"
)
...
)
...
@@ -104,6 +116,12 @@ func newCli(GitCommit string, GitDate string) *cli.App {
...
@@ -104,6 +116,12 @@ func newCli(GitCommit string, GitDate string) *cli.App {
return
nil
return
nil
},
},
},
},
{
Name
:
"all"
,
Flags
:
flags
,
Description
:
"Runs both the api service and the indexing service"
,
Action
:
runAll
,
},
},
},
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment