This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "database/sql" | |
| _ "github.com/bmizerany/pq.go" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "gogobservice" | |
| "net/rpc" | |
| "log" | |
| ) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "gogobservice" | |
| "net/rpc" | |
| "net" | |
| "log" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "recca/rpc" | |
| ) | |
| type Args struct { | |
| A,B int | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Date: 2012-02-08 | |
| // Author: notedit <[email protected]> | |
| // make a go rpc service | |
| package rpc | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from gevent import server | |
| from gevent.monkey import patch_all; patch_all() | |
| from multiprocessing import Process, current_process, cpu_count | |
| def note(format, *args): | |
| sys.stderr.write('[%s]\t%s\n' % (current_process().name, format%args)) | |
| def echo(socket, address): |
NewerOlder