octopus

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

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

Go to latest
Published: Apr 7, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

octopus

Go Report Card CircleCI

Redis Multi-Cluster load balancing using prefix key, No need to change anything, octopus use RESP (REdis Serialization Protocol). Developing/ Testing/ Documention in progress

Config

  • etcd
  • consul
  • json file

Sample JSON:

{
    "port": 9090,
    "pool": {
        "maxcap": 10,
        "initcap": 3
    },
    "clusters": [
        {
            "ismain": true,
            "name": "qok-match",
            "nodes": [
                "172.20.3.4:7001",
                "172.20.3.10:7004"
            ],
            "prefixes": [
                "match:",
                "stats:"
            ]
        },
        {
            "ismain": false,
            "name": "local-test",
            "nodes": [
                "localhost:6379",
                "localhost:6380"
            ],
            "prefixes": [
                "pigfog:"
            ]
        },
        {
            "ismain": false,
            "name": "qok-tournament",
            "nodes": [
                "10.5.150.5:7000",
                "10.5.150.12:7003"
            ],
            "prefixes": [
                "tournament:"
            ]
        }
    ]
}

Usage

Flags:
      --consulkey string   consul k/v namespace
      --etcdaddr string    etcd file address
  -f, --file string        config file name (without extenstion) (default "config")
  -h, --help               help for gate
      --host string        config remote host (ex. http://127.0.0.1:4001)
  -p, --path string        config path (default is /) (default "/")
  -t, --type string        config type (file, etcd, consul) (default "file")
go run main.go -f config -p ./_example -t file

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_example

Jump to

Keyboard shortcuts

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