# radish **Repository Path**: MarsBighead/radish ## Basic Information - **Project Name**: radish - **Description**: Radish a microservice engineering practice project with Golang RPC Framework Kitex. - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-07-15 - **Last Updated**: 2025-02-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Radish Radish a microservice engineering practice project with Golang RPC Framework `Kitex`. ## Generate Code - Generate item pkg structure with specified gen path `/pkg` ```shell kitex -module radish -gen-path pkg idl/item.thrift ``` - Generate item pkg structure ```shell kitex -module radish -gen-path pkg idl/item.thrift ``` - Prepare macroservice directory `cmd/{item,stock}` ```shell mkdir -p cmd/{item,stock} ``` - Generate macro-service entrance ```shell cd cmd/item // Execute in the 'item' directory kitex -module radish -service shop.item -gen-path ../../pkg ../../idl/item.thrift Code Generation is Done! cd - cd cmd/stock // Execute in the 'stock' directory kitex -module radish -service shop.stock -gen-path ../../pkg ../../idl/stock.thrift Code Generation is Done! cd - ``` - Build macro-service `shop.item` ```shell hbu@Pauls-MacBook-Air radish % cd cmd/item hbu@Pauls-MacBook-Air item % ./build.sh hbu@Pauls-MacBook-Air item % tree . . ├── build.sh ├── handler.go ├── kitex_info.yaml ├── main.go ├── output │ ├── bin │ │ └── shop.item │ └── bootstrap.sh └── script └── bootstrap.sh 4 directories, 7 files hbu@Pauls-MacBook-Air item % ./output/bootstrap.sh 2024/12/21 22:15:51.504543 server.go:79: [Info] KITEX: server listen at addr=[::]:8010 ``` - Build automation with make(configured by `makefile`) ```shell hbu@Pauls-MacBook-Air radish % make /Applications/Xcode.app/Contents/Developer/usr/bin/make -C cmd/item all Build application shop.item mkdir -p output/bin cp script/* output/ chmod +x output/bootstrap.sh CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -o output/bin/shop.item /Applications/Xcode.app/Contents/Developer/usr/bin/make -C cmd/stock all Build application shop.stock mkdir -p output/bin cp script/* output/ chmod +x output/bootstrap.sh CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -o output/bin/shop.stock ```