接口 ServiceOperator
-
- 所有已知实现类:
ServiceOperatorV2Impl
public interface ServiceOperatorService operator.- 作者:
- xiweng.yy
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidcreate(java.lang.String namespaceId, java.lang.String serviceName, ServiceMetadata metadata)Create new service.voiddelete(java.lang.String namespaceId, java.lang.String serviceName)Delete service.java.util.Collection<java.lang.String>listAllNamespace()list All service namespace.java.util.Collection<java.lang.String>listService(java.lang.String namespaceId, java.lang.String groupName, java.lang.String selector)Page list service name.com.fasterxml.jackson.databind.node.ObjectNodequeryService(java.lang.String namespaceId, java.lang.String serviceName)Query service detail.java.util.Collection<java.lang.String>searchServiceName(java.lang.String namespaceId, java.lang.String expr)Search service name in namespace according to expr.voidupdate(Service service, ServiceMetadata metadata)Update service information.
-
-
-
方法详细资料
-
create
void create(java.lang.String namespaceId, java.lang.String serviceName, ServiceMetadata metadata) throws com.alibaba.nacos.api.exception.NacosExceptionCreate new service.- 参数:
namespaceId- namespace id of serviceserviceName- grouped service name format like 'groupName@@serviceName'metadata- new metadata of service- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during creating
-
update
void update(Service service, ServiceMetadata metadata) throws com.alibaba.nacos.api.exception.NacosException
Update service information. Due to service basic information can't be changed, so update should only update the metadata of service.- 参数:
service- service need to be updated.metadata- new metadata of service.- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during update
-
delete
void delete(java.lang.String namespaceId, java.lang.String serviceName) throws com.alibaba.nacos.api.exception.NacosExceptionDelete service.- 参数:
namespaceId- namespace id of serviceserviceName- grouped service name format like 'groupName@@serviceName'- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during delete
-
queryService
com.fasterxml.jackson.databind.node.ObjectNode queryService(java.lang.String namespaceId, java.lang.String serviceName) throws com.alibaba.nacos.api.exception.NacosExceptionQuery service detail.- 参数:
namespaceId- namespace id of serviceserviceName- grouped service name format like 'groupName@@serviceName'- 返回:
- service detail with cluster info
- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during query
-
listService
java.util.Collection<java.lang.String> listService(java.lang.String namespaceId, java.lang.String groupName, java.lang.String selector) throws com.alibaba.nacos.api.exception.NacosExceptionPage list service name.- 参数:
namespaceId- namespace id of servicesgroupName- group name of servicesselector- selector- 返回:
- services name list
- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during query
-
listAllNamespace
java.util.Collection<java.lang.String> listAllNamespace()
list All service namespace.- 返回:
- all namespace
-
searchServiceName
java.util.Collection<java.lang.String> searchServiceName(java.lang.String namespaceId, java.lang.String expr) throws com.alibaba.nacos.api.exception.NacosExceptionSearch service name in namespace according to expr.- 参数:
namespaceId- namespace idexpr- search expr- 返回:
- service name collection of match expr
- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception during query
-
-