Extend Endpoint
Endpoint module provides some built-in types of receiving services, but you can also customize or extend other types of receiving services. To achieve this, you need to follow these steps:
- Implement the Message interface (opens new window) . The Message interface is an interface that abstracts different input source data, and it defines some methods to get or set the message content, header, source, parameters, status code, etc. You need to implement this interface for your receiving service type, so that your message type can interact with other types in the endpoint package.
- Implement the Endpoint interface (opens new window) . The Endpoint interface is an interface that defines different receiving service types, and it defines some methods to start, stop, add routes and interceptors, etc. You need to implement this interface for your receiving service type, so that your service type can interact with other types in the endpoint package.
These are the basic steps to extend the endpoint package, and you can refer to the existing endpoint type implementations to write your own code:
Edit this page on GitHub (opens new window)
Last Updated: 2024/10/31, 11:56:12