Advertisement

apisix 简单随机负载均衡插件

阅读量:

本文件为个人博客系统文档的备份版本,创作者为小游,相关博客链接为:点击访问

复制代码
    local ngx         = ngx
    
    -- 插件源数据配置
    local schema = {
    -- 类型
    type = "object",
    -- 插件接收的配置参数
    properties = {
    
    },
    
    minProperties = 1,
    -- 附加属性
    additionalProperties = false,
    }
    
    -- 插件名
    local plugin_name = "xiaoyou"
    
    -- 插件的配置信息
    local _M = {
    -- 版本
    version = 0.1,
    -- 优先级
    priority = 2500,
    -- 插件的类型
    type = 'auth',
    -- 插件名字
    name = plugin_name,
    -- 插件的参数
    schema = schema,
    }
    
    -- 在balancer阶段来处理请求
    -- 常见的阶段:init, 

全部评论 (0)

还没有任何评论哟~