nmq

package module
v0.0.0-...-d8b0a59 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nmq

Not only a message queue

代码生成

deepcopy-gen

安装代码生成工具deepcopy-gen

go install k8s.io/code-generator/cmd/deepcopy-gen@latest

对需要生成辅助代码的结构体上添加标注

// +k8s:deepcopy-gen=true
// MyConfig is the root configuration.
type MyConfig struct {
    Name    string
    Servers []Server
    Options map[string]string
}

// +k8s:deepcopy-gen=true
type Server struct {
    URL    string
    Weight *int
}

执行代码生成指令

deepcopy-gen --output-file zz_generated.deepcopy.go ./internal/config/dynamic/...


或者根目录中添加generate.go文件,并把以下内容添加进去

//go:generate deepcopy-gen --output-file zz_generated.deepcopy.go ./internal/config/dynamic/...

package nmq

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
demo command
nmq command
nmq
Package ncp defines the contracts shared by the NCP application and its components.
Package ncp defines the contracts shared by the NCP application and its components.
internal
metrics
Package metrics provides a reusable Prometheus metrics registry for Gin-based HTTP services.
Package metrics provides a reusable Prometheus metrics registry for Gin-based HTTP services.
pkg
websocket/client
Package client implements the websocket client functionality client包实现了websocket客户端功能
Package client implements the websocket client functionality client包实现了websocket客户端功能
websocket/server
Package server implements the websocket server functionality server包实现了websocket服务器功能
Package server implements the websocket server functionality server包实现了websocket服务器功能
plugins
mq
proxy/healthcheck
Package healthcheck 提供主动和被动两种健康检查机制。
Package healthcheck 提供主动和被动两种健康检查机制。
proxy/server/service/loadbalancer/failover
Package failover 实现故障转移(Failover)机制: 当主后端(handler)不可用或返回特定错误状态码时, 自动将请求转发给备用后端(fallbackHandler); 两个后端都不可用时返回 503 Service Unavailable。
Package failover 实现故障转移(Failover)机制: 当主后端(handler)不可用或返回特定错误状态码时, 自动将请求转发给备用后端(fallbackHandler); 两个后端都不可用时返回 503 Service Unavailable。
proxy/server/service/loadbalancer/hrw
Package hrw 实现了 Highest Random Weight (HRW),即 Rendezvous Hashing 一致性哈希负载均衡算法。
Package hrw 实现了 Highest Random Weight (HRW),即 Rendezvous Hashing 一致性哈希负载均衡算法。
proxy/server/service/loadbalancer/mirror
Package mirror 实现 HTTP 请求流量镜像(Traffic Mirroring)。
Package mirror 实现 HTTP 请求流量镜像(Traffic Mirroring)。
proxy/server/service/tcp
Package tcp 提供 TCP 服务的管理和构建能力。
Package tcp 提供 TCP 服务的管理和构建能力。
proxy/tcp
Package tcp 提供 TCP 服务的加权轮询(Weighted Round Robin)负载均衡器。
Package tcp 提供 TCP 服务的加权轮询(Weighted Round Robin)负载均衡器。

Jump to

Keyboard shortcuts

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