Open trajan0x opened 7 months ago
The RFQ (Request for Quote) service includes the API and relayer components for handling quotes and relaying them to the destination chain.
/services/rfq
├── api
│ ├── client.go
│ ├── cmd
│ ├── config.go
│ ├── db.go
│ ├── main.go
│ ├── middleware.go
│ ├── router.go
│ ├── swagger.go
│ └── test_env.go
├── relayer
│ ├── chain
│ ├── cmd
│ ├── dashboards
│ ├── main.go
│ ├── metadata
│ └── README.md
├── rfqdecoder
│ ├── main.go
│ └── decoder.go
├── Dockerfile
└── README.md
To combine the binaries for the relayer and API, you can create a single entry point in the main.go
file that initializes both services. Here is an example of how you can modify the main.go
file:
package main
import (
"log"
"os"
"services/rfq/api"
"services/rfq/relayer"
)
func main() {
go func() {
if err := api.Start(); err != nil {
log.Fatalf("Failed to start API: %v", err)
}
}()
if err := relayer.Start(); err != nil {
log.Fatalf("Failed to start Relayer: %v", err)
}
}
Ensure that both api
and relayer
packages have a Start
function that initializes and runs the respective services.
/services/rfq /services/rfq/relayer /services/rfq/api /services/rfq/relayer/README.md /services/rfq/README.md
Need readme: