接口 ServiceOperator

  • 所有已知实现类:
    ServiceOperatorV2Impl

    public interface ServiceOperator
    Service operator.
    作者:
    xiweng.yy
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      void create​(java.lang.String namespaceId, java.lang.String serviceName, ServiceMetadata metadata)
      Create new service.
      void delete​(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.ObjectNode queryService​(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.
      void update​(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.NacosException
        Create new service.
        参数:
        namespaceId - namespace id of service
        serviceName - 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.NacosException
        Delete service.
        参数:
        namespaceId - namespace id of service
        serviceName - 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.NacosException
        Query service detail.
        参数:
        namespaceId - namespace id of service
        serviceName - 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.NacosException
        Page list service name.
        参数:
        namespaceId - namespace id of services
        groupName - group name of services
        selector - 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.NacosException
        Search service name in namespace according to expr.
        参数:
        namespaceId - namespace id
        expr - search expr
        返回:
        service name collection of match expr
        抛出:
        com.alibaba.nacos.api.exception.NacosException - nacos exception during query