O'Reilly logo

Distributed Computing with Go by V.N. Nikhil Anurag

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Concierge source code

Now that we have discussed the design of Concierge in detail, let us implement Concierge based on these design points. We will discuss the implementation of api/query.go and Dockerfile in Chapter 8, Deploying Goophr. Let's look at the project structure & source code:

$ tree 
. 
└── goophr 
    └── concierge 
        ├── api 
        │   ├── feeder.go 
        │   ├── feeder_test.go 
        │   └── query.go 
        ├── common 
        │   ├── helpers.go 
        ├── Dockerfile 
        └── main.go 
 
4 directories, 6 files 

Now let's look at the source code for each of the files:

main.go:

package main import ( "net/http" "github.com/last-ent/distributed-go/chapter6/goophr/concierge/api" "github.com/last-ent/distributed-go/chapter6/goophr/concierge/common" ) func main() { common.Log("Adding API handlers...") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required