github.com/koko1123/flow-go-1@v0.29.6/cmd/observer/main.go (about)

     1  package main
     2  
     3  import (
     4  	nodebuilder "github.com/koko1123/flow-go-1/cmd/observer/node_builder"
     5  )
     6  
     7  func main() {
     8  	anb := nodebuilder.NewFlowObserverServiceBuilder()
     9  
    10  	anb.PrintBuildVersionDetails()
    11  
    12  	// parse all the command line args
    13  	if err := anb.ParseFlags(); err != nil {
    14  		anb.Logger.Fatal().Err(err).Send()
    15  	}
    16  
    17  	if err := anb.Initialize(); err != nil {
    18  		anb.Logger.Fatal().Err(err).Send()
    19  	}
    20  
    21  	node, err := anb.Build()
    22  	if err != nil {
    23  		anb.Logger.Fatal().Err(err).Send()
    24  	}
    25  	node.Run()
    26  }