소스 정보
- 저장소
- pluginagentmarketplace/custom-plugin-go
- 최근 소스 활동
- 2025년 12월 30일 12:44
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-go --skill go-grpc명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | go-grpc |
| description | Build gRPC services with Go - protobuf, streaming, interceptors |
| sasmp_version | 1.3.0 |
| bonded_agent | 07-go-microservices |
| bond_type | PRIMARY_BOND |
Build high-performance gRPC services with Go.
Complete guide for gRPC development including protobuf design, streaming, interceptors, and error handling.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| streaming | string | no | "unary" | Type: "unary", "server", "client", "bidi" |
| auth | string | no | "none" | Auth: "none", "jwt", "mtls" |
syntax = "proto3";
package api.v1;
option go_package = "github.com/example/api/v1;apiv1";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse);
rpc ListUsers(ListUsersRequest) returns (stream User);
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
}
message User {
int64 id = 1;
string name = 2;
string email = 3;
google.protobuf.Timestamp created_at = 4;
}
type userServer struct {
apiv1.UnimplementedUserServiceServer
store UserStore
}
func (s *userServer) GetUser(ctx context.Context, req *apiv1.GetUserRequest) (*apiv1.GetUserResponse, error) {
user, err := s.store.FindByID(ctx, req.Id)
if err != nil {
if errors.Is(err, ErrNotFound) {
return nil, status.Error(codes.NotFound, "user not found")
}
return nil, status.Error(codes.Internal, "internal error")
}
return &apiv1.GetUserResponse{
User: toProtoUser(user),
}, nil
}
func (s *userServer) ListUsers(req *apiv1.ListUsersRequest, stream apiv1.UserService_ListUsersServer) error {
users, err := s.store.List(stream.Context(), req.PageSize)
if err != nil {
return status.Error(codes.Internal, "failed to list users")
}
for _, user := range users {
if err := stream.Send(toProtoUser(user)); err != nil {
return err
}
}
return nil
}
func LoggingInterceptor(logger *slog.Logger) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
start := time.Now()
resp, err := handler(ctx, req)
logger.Info("grpc call",
"method", info.FullMethod,
"duration", time.Since(start),
"error", err,
)
return resp, err
}
}
func RecoveryInterceptor() grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
defer func() {
if r := recover(); r != nil {
err = status.Errorf(codes.Internal, "panic: %v", r)
}
}()
return handler(ctx, req)
}
}
func NewClient(addr string) (apiv1.UserServiceClient, error) {
conn, err := grpc.Dial(addr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(
grpc_retry.UnaryClientInterceptor(
grpc_retry.WithMax(3),
grpc_retry.WithBackoff(grpc_retry.BackoffExponential(100*time.Millisecond)),
grpc_retry.WithCodes(codes.Unavailable, codes.ResourceExhausted),
),
),
)
if err != nil {
return nil, err
}
return apiv1.NewUserServiceClient(conn), nil
}
| Code | Use Case |
|---|---|
| OK | Success |
| INVALID_ARGUMENT | Bad input |
| NOT_FOUND | Resource missing |
| ALREADY_EXISTS | Duplicate |
| DEADLINE_EXCEEDED | Timeout |
| UNAVAILABLE | Service down |
| INTERNAL | Server bug |
grpcurl -plaintext localhost:50051 list
grpcurl -plaintext -d '{"id": 1}' localhost:50051 api.v1.UserService/GetUser
Skill("go-grpc")
SOC 직업 분류 기준