unified gateway interfaces

This commit is contained in:
Stephan D
2026-01-04 12:47:43 +01:00
parent 743f683d92
commit 59c83e414a
41 changed files with 927 additions and 186 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/tech/sendico/pkg/mservice"
gatewayv1 "github.com/tech/sendico/pkg/proto/common/gateway/v1"
mntxv1 "github.com/tech/sendico/pkg/proto/gateway/mntx/v1"
unifiedv1 "github.com/tech/sendico/pkg/proto/gateway/unified/v1"
"go.uber.org/zap"
"google.golang.org/grpc"
)
@@ -31,7 +32,7 @@ type Service struct {
gatewayDescriptor *gatewayv1.GatewayInstanceDescriptor
announcer *discovery.Announcer
mntxv1.UnimplementedMntxGatewayServiceServer
unifiedv1.UnimplementedUnifiedGatewayServiceServer
}
type payoutFailure interface {
@@ -96,7 +97,7 @@ func NewService(logger mlogger.Logger, opts ...Option) *Service {
// Register wires the service onto the provided gRPC router.
func (s *Service) Register(router routers.GRPC) error {
return router.Register(func(reg grpc.ServiceRegistrar) {
mntxv1.RegisterMntxGatewayServiceServer(reg, s)
unifiedv1.RegisterUnifiedGatewayServiceServer(reg, s)
})
}
@@ -145,6 +146,7 @@ func (s *Service) startDiscoveryAnnouncer() {
Service: "CARD_PAYOUT_RAIL_GATEWAY",
Rail: "CARD_PAYOUT",
Operations: []string{"payout.card"},
InvokeURI: discovery.DefaultInvokeURI(string(mservice.MntxGateway)),
Version: appversion.Create().Short(),
}
if s.gatewayDescriptor != nil {