Skip to content
concrete implementation choices for plz service
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
counselor
http
pnp
service
thrift
LICENSE
README.md
plz.go

README.md

plz.service

concrete implementation choices for plz service

http

server

func sayHello(ctx *countlog.Context, req *MyReqeust) (*MyResponse, error) {
	// ...
}
server := http.NewServer()
server.Handle("/sayHello", sayHello)
server.Start("127.0.0.1:9998")

client

var sayHello = func (ctx *countlog.Context, req *MyReqeust) (*MyResponse, error)
client := http.NewClient()
client.Handle("POST", "http://127.0.0.1:9998/sayHello", &sayHello)

// use sayHello(...) to call server

thrift

server

func sayHello(ctx *countlog.Context, req *MyReqeust) (*MyResponse, error) {
	// ...
}
server := thrift.NewServer(thrifter.Config{Protocol: thrifter.ProtocolBinary, IsFramed: true}.Froze())
server.Handle("sayHello", sayHello)
server.Start("127.0.0.1:9998")

client

var sayHello = func (ctx *countlog.Context, req *MyReqeust) (*MyResponse, error)
client := thrift.NewClient(thrifter.Config{Protocol: thrifter.ProtocolBinary, IsFramed: true}.Froze())
client.Handle("127.0.0.1:9998", "sayHello", &sayHello)

// use sayHello(...) to call server
You can’t perform that action at this time.