Updated codec interface and code. Painful stuff

This commit is contained in:
Asim
2015-11-28 11:22:29 +00:00
parent f49922f6b3
commit 654728027b
18 changed files with 380 additions and 352 deletions

View File

@@ -3,7 +3,6 @@ package main
import (
log "github.com/golang/glog"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/codec/bson"
"github.com/micro/go-micro/examples/server/handler"
"github.com/micro/go-micro/examples/server/subscriber"
"github.com/micro/go-micro/server"
@@ -13,16 +12,15 @@ func main() {
// optionally setup command line usage
cmd.Init()
server.DefaultServer = server.NewServer(
server.Codec("application/bson", bson.Codec),
)
// server.DefaultServer = server.NewServer(
// server.Codec("application/bson", bson.Codec),
// )
// Initialise Server
server.Init(
server.Name("go.micro.srv.example"),
)
// Register Handlers
server.Handle(
server.NewHandler(