Socket
Book a DemoInstallSign in
Socket

antfin-sofa-node-antvip

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antfin-sofa-node-antvip

金融云的 antvip client

1.0.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

antfin-sofa-node-antvip

金融云 antvip 客户端

安装

$ tnpm install antfin-sofa-node-antvip --save

配置

'use strict';

const os = require('os');

exports.antvip = {
  endpoint: '10.xx.xx.xx',
  cacheDir: path.join(os.homedir(), 'conf/antvip-node-client-cache'),
};

用法

app.antvip.subscribe('xxxxxxxxx-DSR_CLOUD', domain => {
  // ...
});

const server = yield app.antvip.getRealServer('xxxxxxxxx-ProductName');
console.log(server);

API

* getRealServer(domainName)

根据域名,从候选的 RealServer 列表中,按照负载均衡(带 weight 的 RoundRobin )的方式,返回 RealServer。

* getRealServers(domainName)

根据域名,返回健康状态属于可用的 RealServer 列表。

* getAllRealServers(domainName)

根据域名,返回所有的(无论健康状态属于可用的还是不可用) RealServer 列表

Keywords

antvip

FAQs

Package last updated on 09 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.