webgo

command module
v0.0.0-...-b5c7783 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

README

View

Architecture

                                                                 ┌────────────────────┐
                                                                 │        AI          │
                                                                 └────────────────────┘
                                                                            |          
   ┌──────────────────────────────────────────────────────────────────────────────────┐
   │                                     MQ                                           │
   └──────────────────────────────────────────────────────────────────────────────────┘
          |              |               |                |                 |          
          |              |               |                |                 |          
   ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ ┌────────────────┐ ┌──────────────┐                
   │    lhttp    │ │ lttp        │ │  Go worker   │ │ Go worker      │ │ Go worker    │                
   └─────────────┘ └─────────────┘ └──────────────┘ └────────────────┘ └──────────────┘                
          |              |                                                             
          |              |                                                             
   ┌─────────────┐ ┌────────────┐                                                    
   │  client1    │ │ client2    │                                                    
   └─────────────┘ └────────────┘                                                    
  • client1 create room, publish worker to MQ
  • One or more worker accept this work, create a chess manual and a play room
  • client1,client2 and worker subscribe roomId
  • client Lazi, publish to roomId
  • worker receive the Lazi location, return back the resault(is the Lazi invalid, and eat chess pieces info)
  • publish to client1 and client2

We can scale up the workers, and using multiple workers to ensuring play reliability.

Quick start

$ go get github.com/nats-io/gnatsd
$ go get github.com/fanux/webGo
$ gnatsd&
$ go run main.go run &
$ go run main.go front 

Open your browser, http://localhost:9090, enjoy it!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/fanux/lhttp
you can define your handle to processing your private header before or after process message
you can define your handle to processing your private header before or after process message
_workspace/src/github.com/fsnotify/fsnotify
Package fsnotify provides a platform-independent interface for file system notifications.
Package fsnotify provides a platform-independent interface for file system notifications.
_workspace/src/github.com/hashicorp/hcl
Package hcl decodes HCL into usable Go structures.
Package hcl decodes HCL into usable Go structures.
_workspace/src/github.com/hashicorp/hcl/hcl/ast
Package ast declares the types used to represent syntax trees for HCL (HashiCorp Configuration Language)
Package ast declares the types used to represent syntax trees for HCL (HashiCorp Configuration Language)
_workspace/src/github.com/hashicorp/hcl/hcl/parser
Package parser implements a parser for HCL (HashiCorp Configuration Language)
Package parser implements a parser for HCL (HashiCorp Configuration Language)
_workspace/src/github.com/hashicorp/hcl/hcl/scanner
Package scanner implements a scanner for HCL (HashiCorp Configuration Language) source text.
Package scanner implements a scanner for HCL (HashiCorp Configuration Language) source text.
_workspace/src/github.com/hashicorp/hcl/hcl/token
Package token defines constants representing the lexical tokens for HCL (HashiCorp Configuration Language)
Package token defines constants representing the lexical tokens for HCL (HashiCorp Configuration Language)
_workspace/src/github.com/magiconair/properties
Package properties provides functions for reading and writing ISO-8859-1 and UTF-8 encoded .properties files and has support for recursive property expansion.
Package properties provides functions for reading and writing ISO-8859-1 and UTF-8 encoded .properties files and has support for recursive property expansion.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/nats-io/nats
A Go client for the NATS messaging system (https://nats.io).
A Go client for the NATS messaging system (https://nats.io).
_workspace/src/github.com/spf13/cobra
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
_workspace/src/github.com/spf13/pflag
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
_workspace/src/golang.org/x/sys/unix
Package unix contains an interface to the low-level operating system primitives.
Package unix contains an interface to the low-level operating system primitives.
_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL