2026-05-14 17:44:16 +08:00

22 lines
719 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package client
import (
"context"
"google.golang.org/grpc"
activityv1 "hyapp.local/api/proto/activity/v1"
)
// ActivityGrowthClient 只包装等级事件消费 RPC避免 game-service 依赖 activity-service 内部实现。
type ActivityGrowthClient struct {
client activityv1.GrowthLevelServiceClient
}
func NewActivityGrowthClient(conn *grpc.ClientConn) *ActivityGrowthClient {
return &ActivityGrowthClient{client: activityv1.NewGrowthLevelServiceClient(conn)}
}
func (c *ActivityGrowthClient) ConsumeLevelEvent(ctx context.Context, req *activityv1.ConsumeLevelEventRequest, opts ...grpc.CallOption) (*activityv1.ConsumeLevelEventResponse, error) {
return c.client.ConsumeLevelEvent(ctx, req, opts...)
}