To add a new integration to the AsyncDestinationManager, follow these steps:
1. Determine Integration Type
Choose between Complex Async (polling required), Simple Async (fire-and-forget), or SFTP.
2. Create Integration Directory
Create a directory under asyncdestinationmanager/ with the following structure:
asyncdestinationmanager/
└── your-destination/
├── manager.go # Main manager implementation
├── types.go # Data structures
├── your-destination.go # Core logic
├── utils.go # Helper functions (optional)
├── testdata/ # Test files
└── your-destination_test.go
3. Implement Required Files
manager.go: Implement NewManager(logger logger.Logger, statsFactory stats.Stats, destination *backendconfig.DestinationT) (common.AsyncDestinationManager, error).types.go: Define destination-specific configuration and response types.
4. Implement Core Interface
Implement either the full AsyncDestinationManager (Pattern A) or use SimpleAsyncDestinationManager (Pattern B) if the destination is fire-and-forget.
5. Register in Manager Factory
- Add the destination name to the
asyncDestinations slice in utils.go. - Add a new case to the
switch statement in newRegularManager within manager.go to return your new manager implementation.