nyx

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

README

NYX

version 1.0

golang微服务框架

支持http、tcp、ws(websocket)、rpc 和 cli 服务模式

Installation

Quick Start

Documentation

Index

Constants

View Source
const (
	SYSTEM_VERSION = "1.0"

	SERVER_HTTP = "http"
	SERVER_RPC  = "rpc"
	SERVER_TCP  = "tcp"
	SERVER_WS   = "ws"
	SERVER_CLI  = "cli"
)

Variables

This section is empty.

Functions

func AddApi

func AddApi(c interface{}, group ...string)

添加http 方法对应的controller实例, 支持分组; 默认url路径: controller/action, 分组时路径: group/controller/action

func AddCli

func AddCli(c interface{})

添加cli 方法对应的controller实例

func AddGrpcServerOption

func AddGrpcServerOption(o ...grpc.ServerOption)

添加 grpc ServerOption

func AddRpc

func AddRpc(c interface{}, group ...string)

添加rpc 方法对应的controller实例

Types

type Nyx

type Nyx struct {
	Mode []string
	// contains filtered or unexported fields
}

func NewNyx

func NewNyx() *Nyx

func (*Nyx) Init

func (this *Nyx) Init()

func (*Nyx) Run

func (this *Nyx) Run()

支持命令行参数 -m 指定运行模式

func (*Nyx) RunCli

func (this *Nyx) RunCli()

func (*Nyx) RunHttp

func (this *Nyx) RunHttp()

func (*Nyx) RunRpc

func (this *Nyx) RunRpc()

func (*Nyx) RunTcp

func (this *Nyx) RunTcp()

func (*Nyx) RunWebsocket

func (this *Nyx) RunWebsocket()

Directories

Path Synopsis
cmd
nyx
dao
tx
x
db
log
pb

Jump to

Keyboard shortcuts

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