router

package
v0.0.0-...-917d9ad Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NONE_RULE_ID 初始化角色
	NONE_RULE_ID = 1
	// KEYED_RULE_ID 完成密钥交换
	KEYED_RULE_ID = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	Proxy *proxy.RpcProxy // 路由器网络通信器
	// contains filtered or unexported fields
}

Router 路由器

func (*Router) GetMessageTimeout

func (r *Router) GetMessageTimeout(message proto.Message) int64

func (*Router) IsRulePass

func (r *Router) IsRulePass(rule int32) bool

type RouterConfig

type RouterConfig struct {
	URI       string `yaml:"uri"`
	Algorithm string `yaml:"algorithm"`
}

type RouterGroup

type RouterGroup struct {
	// contains filtered or unexported fields
}

func Loader

func Loader(filePath string, algorithm string) (*RouterGroup, error)

func (*RouterGroup) Find

func (rg *RouterGroup) Find(vaddr string) *Router

func (*RouterGroup) Get

func (rg *RouterGroup) Get(command string) *Router

Get 获取一个路由器

func (*RouterGroup) Open

func (rg *RouterGroup) Open()

Open 打开路由组

func (*RouterGroup) Push

func (rg *RouterGroup) Push(router *Router) error

Push 插入路由器

func (*RouterGroup) Shutdown

func (rg *RouterGroup) Shutdown()

Shutdown 关闭路由组

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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