Apq.Cfg.Apollo.CfgBuilderExtensions.AddApollo.md 5.2 KB

Apq.Cfg.Apollo.CfgBuilderExtensions

CfgBuilderExtensions.AddApollo Method

Overloads
AddApollo(this CfgBuilder, string, string, string[], int, bool) 添加 Apollo 配置源(使用默认选项)
AddApollo(this CfgBuilder, Action<ApolloCfgOptions>, int, bool) 添加 Apollo 配置源

CfgBuilderExtensions.AddApollo(this CfgBuilder, string, string, string[], int, bool) Method

添加 Apollo 配置源(使用默认选项)

public static Apq.Cfg.CfgBuilder AddApollo(this Apq.Cfg.CfgBuilder builder, string appId, string metaServer="http://localhost:8080", string[]? namespaces=null, int level=0, bool enableHotReload=true);

Parameters

builder Apq.Cfg.CfgBuilder

配置构建器

appId System.String

Apollo 应用 ID

metaServer System.String

Meta Server 地址

namespaces System.String[]

命名空间列表

level System.Int32

配置层级

enableHotReload System.Boolean

是否启用热重载

Returns

Apq.Cfg.CfgBuilder
配置构建器

CfgBuilderExtensions.AddApollo(this CfgBuilder, Action<ApolloCfgOptions>, int, bool) Method

添加 Apollo 配置源

public static Apq.Cfg.CfgBuilder AddApollo(this Apq.Cfg.CfgBuilder builder, System.Action<Apq.Cfg.Apollo.ApolloCfgOptions> configure, int level, bool isPrimaryWriter=false);

Parameters

builder Apq.Cfg.CfgBuilder

配置构建器

configure System.Action<ApolloCfgOptions>

配置选项

level System.Int32

配置层级,数值越大优先级越高

isPrimaryWriter System.Boolean

是否为主写入源(Apollo 不支持写入)

Returns

Apq.Cfg.CfgBuilder
配置构建器