// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2

package svc

import (
	"juwan-backend/app/player/api/internal/config"
	"juwan-backend/app/player/rpc/playerservice"
	"juwan-backend/app/users/rpc/usercenter"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	PlayerRpc playerservice.PlayerService
	UserRpc   usercenter.Usercenter
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		PlayerRpc: playerservice.NewPlayerService(zrpc.MustNewClient(c.PlayerRpcConf)),
		UserRpc:   usercenter.NewUsercenter(zrpc.MustNewClient(c.UsercenterRpcConf)),
	}
}
