github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/cmd/execution/main.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/onflow/flow-go/cmd"
     5  	"github.com/onflow/flow-go/model/flow"
     6  )
     7  
     8  func main() {
     9  	exeBuilder := cmd.NewExecutionNodeBuilder(cmd.FlowNode(flow.RoleExecution.String()))
    10  	exeBuilder.LoadFlags()
    11  
    12  	if err := exeBuilder.FlowNodeBuilder.Initialize(); err != nil {
    13  		exeBuilder.FlowNodeBuilder.Logger.Fatal().Err(err).Send()
    14  	}
    15  
    16  	exeBuilder.LoadComponentsAndModules()
    17  
    18  	node, err := exeBuilder.FlowNodeBuilder.Build()
    19  	if err != nil {
    20  		exeBuilder.FlowNodeBuilder.Logger.Fatal().Err(err).Send()
    21  	}
    22  	node.Run()
    23  }