log.Item(skynet.MongoError{*mgoserver, fmt.Sprintf("unable to obtain collection names: %s", err)}) continue } for _, coll := range colls { sdata = append(sdata, db+":"+coll) } } buf := new(bytes.Buffer) searchTmpl.Execute(buf, sdata) layoutTmpl.Execute(w, template.HTML(buf.String())) } var addr = flag.String("addr", ":8080", "dashboard listener address") var doozer = flag.String("doozer", skynet.GetDefaultEnvVar("SKYNET_DZHOST", skynet.DefaultDoozerdAddr), "initial doozer instance to connect to") var doozerboot = flag.String("doozerboot", skynet.GetDefaultEnvVar("SKYNET_DZNSHOST", ""), "initial doozer instance to connect to") var autodiscover = flag.Bool("autodiscover", skynet.GetDefaultEnvVar("SKYNET_DZDISCOVER", "true") == "true", "auto discover new doozer instances") var debug = flag.Bool("d", false, "print debug info") var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") var webroot = flag.String("webroot", ".", "root of templates and javascript libraries") var mgoserver = flag.String("mgoserver", skynet.GetDefaultEnvVar("SKYNET_MGOSERVER", ""), "comma-separated list of urls of mongodb servers") var mgodb = flag.String("mgodb", skynet.GetDefaultEnvVar("SKYNET_MGODB", ""), "mongodb database") var DC *skynet.DoozerConnection func main() { var err error flag.Parse()
"github.com/bketelsen/skynet" "github.com/bketelsen/skynet/client" "github.com/bketelsen/skynet/examples/testing/fibonacci" "math/rand" "os" "os/signal" "strconv" "strings" "sync" "syscall" "time" ) var requests = flag.Int("requests", 10, "number of concurrent requests") var doozer = flag.String("doozer", skynet.GetDefaultEnvVar("SKYNET_DZHOST", "127.0.0.1:8046"), "doozer instance to connect to") var totalRequests = expvar.NewInt("total-requests") var successfulRequests = expvar.NewInt("successful-requests") var testserviceClient *client.ServiceClient var fibserviceClient *client.ServiceClient func main() { flag.Parse() doozerConfig := &skynet.DoozerConfig{ Uri: *doozer, AutoDiscover: true, }
import ( "bufio" "flag" "fmt" "github.com/bketelsen/skynet" "github.com/bketelsen/skynet/client" "github.com/bketelsen/skynet/service" "os" "strconv" "strings" "syscall" ) var ( DoozerHost *string = flag.String("doozer", skynet.GetDefaultEnvVar("DZHOST", "127.0.0.1:8046"), "initial doozer instance to connect to") VersionFlag *string = flag.String("version", "", "service version") ServiceNameFlag *string = flag.String("service", "", "service name") HostFlag *string = flag.String("host", "", "host") PortFlag *string = flag.String("port", "", "port") RegionFlag *string = flag.String("region", "", "region") RegisteredFlag *string = flag.String("registered", "", "registered") ) var DC *skynet.DoozerConnection func main() { flag.Parse() query := &client.Query{ DoozerConn: Doozer(),
continue } for _, coll := range colls { sdata = append(sdata, db+":"+coll) } } buf := new(bytes.Buffer) searchTmpl.Execute(buf, sdata) layoutTmpl.Execute(w, template.HTML(buf.String())) } var addr = flag.String("addr", ":8080", "dashboard listener address") var doozer = flag.String("doozer", skynet.GetDefaultEnvVar("SKYNET_DZHOST", skynet.DefaultDoozerdAddr), "initial doozer instance to connect to") var doozerboot = flag.String("doozerboot", skynet.GetDefaultEnvVar("SKYNET_DZNSHOST", ""), "initial doozer instance to connect to") var autodiscover = flag.Bool("autodiscover", skynet.GetDefaultEnvVar("SKYNET_DZDISCOVER", "true") == "true", "auto discover new doozer instances") var debug = flag.Bool("d", false, "print debug info") var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") var webroot = flag.String("webroot", ".", "root of templates and javascript libraries") var mgoserver = flag.String("mgoserver", skynet.GetDefaultEnvVar("SKYNET_MGOSERVER", ""), "comma-separated list of urls of mongodb servers")