gourd

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

Gourd 0.1 Beta 2020

Gourd is a Golang Net development framework.

中文 | English

框架由来

我正在学习Golang,由于我是PHPer,在学习golang开发中,发现很多对于PHPer习惯不太友好的地方。
为了从PHP更快上手Golang,我决定一边学习,一边撸一个自己习惯使用的框架。
由于学习的越深入,不断的完善,相信我能够为PHP转Go的各位带来帮助。

主要特性

  • 轻量级易扩展
  • 快速上手开发应用
  • 内置Websocket和TcpSocket连接池管理
  • 内置Websocket和TcpSocket事件回调
  • 内存缓存和Session
  • 定时任务

开始使用

git下载 在命令行中运行
git clone https://github.com/kyour-cn/gourd-widget.git

前往Github下载
https://github.com/kyour-cn/gourd-widget

zip下载
点击下载

参与开发

直接提交PR或者Issue即可

版权信息

Gourd遵循Apache2开源协议发布,并提供免费使用。

本项目包含的第三方源码和二进制文件之版权信息另行标注。

版权所有Copyright © 2020 by Kyour (http://kyour.cn) All rights reserved。

更多细节参阅 LICENSE.txt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name     string
	Debug    bool
	ConfPath string
	Router   router.Router
	TcpEvent tcp.Event
	Config   application.Config
}

func NewApp

func NewApp() Application

创建Application

func (*Application) ConfigPath

func (app *Application) ConfigPath(path string)

设定配置文件

func (*Application) HttpRoute

func (app *Application) HttpRoute(LoadRouter func() (route *router.Router))

设定Http路由

func (*Application) RegistTcp

func (app *Application) RegistTcp(e tcp.Event)

设定Tcp事件

func (*Application) Serve

func (app *Application) Serve()

启动

Directories

Path Synopsis
db
router
Package router implements a request router and dispatcher.
Package router implements a request router and dispatcher.
tcp
ws
utils
gut
toml
Package toml provides facilities for decoding and encoding TOML configuration files via reflection.
Package toml provides facilities for decoding and encoding TOML configuration files via reflection.

Jump to

Keyboard shortcuts

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