small fixes

This commit is contained in:
tanyamadaan
2025-03-22 00:05:08 +05:30
parent 423adb4e00
commit fe1ffa356c
16 changed files with 35 additions and 1016 deletions

View File

@@ -1,24 +0,0 @@
package definition
import (
"context"
"net/url"
)
// Route defines the structure for the Route returned
type Route struct {
RoutingType string // "url" or "msgq"
TopicID string // For message queues
TargetURL string // For API calls
}
// RouterProvider initializes the a new Router instance with the given config
type RouterProvider interface {
New(ctx context.Context, config map[string]string) (Router, func() error, error)
}
// Router defines the interface for routing requests
type Router interface {
// Route determines the routing destination based on the request context.
Route(ctx context.Context, url *url.URL, body []byte) (*Route, error)
}