-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace kafka topic producers with send invocations
kafka is barely used and would just be an extra unnecessary dependency
- Loading branch information
Showing
25 changed files
with
134 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './lib/dtos'; | ||
export * from './lib/entities'; | ||
export * from './lib/services'; | ||
export * from './lib/topics'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,59 @@ | ||
import { restate, RestateServiceContext } from 'deepkit-restate'; | ||
import { UUID } from '@deepkit/type'; | ||
|
||
import { Restaurant, RestaurantMenu } from '@ftgo/restaurant-service-api'; | ||
import { | ||
KafkaRestaurantMenuRevisedTopic, | ||
KafkaRestaurantCreatedTopic, | ||
Restaurant, | ||
RestaurantMenu, | ||
} from '@ftgo/restaurant-service-api'; | ||
import { | ||
Kitchen, | ||
KitchenServiceApi, | ||
KitchenServiceHandlers, | ||
Ticket, | ||
TicketDetails, | ||
} from '@ftgo/kitchen-service-api'; | ||
|
||
@restate.service<KitchenServiceApi>() | ||
export class KitchenService implements KitchenServiceHandlers { | ||
// @ts-ignore | ||
@(restate.kafka<KafkaRestaurantCreatedTopic>().handler()) | ||
@restate.handler() | ||
async createMenu(restaurant: Restaurant): Promise<void> {} | ||
|
||
// @ts-ignore | ||
@(restate.kafka<KafkaRestaurantMenuRevisedTopic>().handler()) | ||
@restate.handler() | ||
async reviseMenu(menu: RestaurantMenu): Promise<void> {} | ||
|
||
@restate.handler() | ||
async beginCancelTicket(restaurantId: UUID, orderId: UUID): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
@restate.handler() | ||
async cancelTicket(orderId: UUID): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
@restate.handler() | ||
async confirmCancelTicket( | ||
restaurantId: UUID, | ||
orderId: UUID, | ||
): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
@restate.handler() | ||
async confirmCreateTicket(ticketId: UUID): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
@restate.handler() | ||
async createTicket( | ||
restaurantId: UUID, | ||
orderId: UUID, | ||
details: TicketDetails, | ||
): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
@restate.handler() | ||
async undoBeginCancelTicket( | ||
restaurantId: UUID, | ||
orderId: UUID, | ||
): Promise<Ticket> { | ||
return Promise.resolve(undefined); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.