# Overview
The service declaration function is used to define the underlying RPC service information, supporting Dubbo, gRPC, and HTTP. The defined service declaration can be referenced and used in the service orchestration interface. The underlying RPC service information is unifiedly managed through service declarations. When relevant information changes, only the service declarations need to be modified to avoid changes to the service orchestration interface. The service declaration function is introduced below.
# Service declaration list
Menu location: RPC Management > Service Statement. Click the menu to enter the service declaration list page, as shown in the figure.
# Add service statement
Click the Add button to pop up the new window, as shown in the figure.
Service type: declared service type, optional Dubbo, gRPC, HTTP, required;
When Service Type selects Dubbo:
Service name: Dubbo service name. The service name must include the package path, such as: com.abc.UserService; the service name cannot be modified after saving;
Description: Description of the service;
Version: version number of Dubbo interface;
Group: Group of Dubbo interface.
When Service Type selects gRPC:
Service name: gRPC service name. The service name must include the package path, such as: com.abc.UserService. The reflection function must be enabled for the gRPC service. The service name cannot be modified after saving;
Description: Description of the service;
Instance list: Enter the instance IP:Port or domain name:Port of the gRPC service. Multiple instances are separated by commas and are required;
Load balancing: The load balancing strategy used by service calls, supporting polling and randomization.
When Service Type selects HTTP:
Service name: HTTP service name. The service name can be customized. The gateway will obtain the IP and port of the instance based on this name, such as: OrderService; the service name cannot be modified after saving;
Description: Description of the service;
Instance list: Enter the instance IP:Port or domain name:Port of the HTTP service. Multiple instances are separated by commas and are required;
Load balancing: The load balancing strategy used by service calls, supporting polling and randomization.
# Edit service statement
Click the Edit button to pop up the editing window, as shown in the figure.
# Delete service statement
Click the Delete button to pop up the deletion confirmation window, as shown in the figure.
When there is a service declaration referenced by the service orchestration interface, the deletion fails, as shown in the figure.
# Service declaration reference
Dubbo service declaration reference in the service orchestration interface, as shown in the figure.
The gRPC service declaration reference in the service orchestration interface is as shown in the figure.
The HTTP service declaration reference in the service orchestration interface is as shown in the figure.