neuron

command module
v0.0.0-...-205ef5e Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 14 Imported by: 0

README

Neuron

一款强大的HTTP / Websocket服务器,可用于开发微服务框架,IoT,分布式爬网程序。

特点

  • 「仅使用Go标准库」实现HTTP服务器及HTTP静态文件服务器,启动后自动创建static目录及index.html

  • 生命周期明晰,微服务架构,可在配置文件中开关服务,启动后自动创建config.json

    "AutorunConfig": {
        # 端口转发服务
        "ADProxy": true,
        # RPC & MQ 服务端
        "ADCommander": true,
        # RPC & MQ 客户端
        "ADReceiver": true,
        # Example -> 分布式爬虫服务端
        "SDExamplePublish": true,
        # Example -> 分布式爬虫客户端
        "SDExampleSubscribe": true
    }
    
  • 自带HTTPS实现

    "HTTPS": {
        # 开关
        "Open": false,
        # 服务端口号(通常为443)
        "TLSPort": 8443,
        # 对应根目录下证书文件 -> ./tls/tls.crt & ./tls/tls.key
        "TLSCertPath": "/tls/tls" 
    }
    
  • 自带代理及端口转发(支持TCP2TCP & TCP2UDP & UDP2UDP & UDP2TCP & UART2UDP)

{
    "ProxyHub": {
        "TCP": {
            # 主机192.168.1.100的6666端口转发到本机的6666端口
            "0.0.0.0:6666":"192.168.1.100:6666",
            # 主机192.168.1.100的7777端口转发到本机的7777端口
            "0.0.0.0:7777":"192.168.1.100:7777"
        },
        "UDP": {},
        "TCP2UDP": {},
        "UDP2TCP": {},
        "UART2UDP": {
            # 主机RS232或者RS485串口转发到本机UDP协议55555端口
            "0.0.0.0:55555": {
                "PortName": "/dev/ttyAMA0",
                "BaudRate": 115200,
                "DataBits": 8,
                "StopBits": 1,
                "MinimumReadSize": 4
            }
        }
    }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src
controller
* ===========================================================================
* ===========================================================================
frame
* ===========================================================================
* ===========================================================================
model
* ===========================================================================
* ===========================================================================
modules/blowfish
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
modules/decimal
Package decimal implements an arbitrary precision fixed-point decimal.
Package decimal implements an arbitrary precision fixed-point decimal.
modules/logs/logger
Package logs 是基于 XML 配置的日志系统。
Package logs 是基于 XML 配置的日志系统。
modules/logs/logger/internal/config
Package config 表示 logs 包的配置文件处理。
Package config 表示 logs 包的配置文件处理。
modules/logs/logger/internal/initfunc
Package initfunc 实现了 logs/writers 下的 WriterInitializer 接口。
Package initfunc 实现了 logs/writers 下的 WriterInitializer 接口。
modules/logs/logger/writers
Package writers 提供了一组实现 io.Writer 接口的结构。
Package writers 提供了一组实现 io.Writer 接口的结构。
modules/logs/term/ansi
输出 ansi 控制码,windows 系统默认情况下不支持 ansi 控制码。
输出 ansi 控制码,windows 系统默认情况下不支持 ansi 控制码。
modules/logs/term/colors
colors 带色彩的控制台文本输出包,兼容 windows 平台。
colors 带色彩的控制台文本输出包,兼容 windows 平台。
modules/mysql
Package mysql provides a MySQL driver for Go's database/sql package.
Package mysql provides a MySQL driver for Go's database/sql package.
modules/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
modules/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
modules/redigo/redisx
Package redisx contains experimental features for Redigo.
Package redisx contains experimental features for Redigo.
modules/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.

Jump to

Keyboard shortcuts

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