49 lines
1.4 KiB
Go
49 lines
1.4 KiB
Go
|
// Code generated by liverpcgen, DO NOT EDIT.
|
||
|
// source: *.proto files under this directory
|
||
|
// If you want to change this file, Please see README in go-common/app/tool/liverpc/protoc-gen-liverpc/
|
||
|
package liverpc
|
||
|
|
||
|
import (
|
||
|
"go-common/app/service/live/room_ex/api/liverpc/v1"
|
||
|
"go-common/library/net/rpc/liverpc"
|
||
|
)
|
||
|
|
||
|
// Client that represents a liverpc room_ex service api
|
||
|
type Client struct {
|
||
|
cli *liverpc.Client
|
||
|
// V1BannerMng presents the controller in liverpc
|
||
|
V1BannerMng v1.BannerMng
|
||
|
// V1Banner presents the controller in liverpc
|
||
|
V1Banner v1.Banner
|
||
|
// V1RoomNews presents the controller in liverpc
|
||
|
V1RoomNews v1.RoomNews
|
||
|
}
|
||
|
|
||
|
// DiscoveryAppId the discovery id is not the tree name
|
||
|
var DiscoveryAppId = "live.roomex"
|
||
|
|
||
|
// New a Client that represents a liverpc live.roomex service api
|
||
|
// conf can be empty, and it will use discovery to find service by default
|
||
|
// conf.AppID will be overwrite by a fixed value DiscoveryAppId
|
||
|
// therefore is no need to set
|
||
|
func New(conf *liverpc.ClientConfig) *Client {
|
||
|
if conf == nil {
|
||
|
conf = &liverpc.ClientConfig{}
|
||
|
}
|
||
|
conf.AppID = DiscoveryAppId
|
||
|
var realCli = liverpc.NewClient(conf)
|
||
|
cli := &Client{cli: realCli}
|
||
|
cli.clientInit(realCli)
|
||
|
return cli
|
||
|
}
|
||
|
|
||
|
func (cli *Client) GetRawCli() *liverpc.Client {
|
||
|
return cli.cli
|
||
|
}
|
||
|
|
||
|
func (cli *Client) clientInit(realCli *liverpc.Client) {
|
||
|
cli.V1BannerMng = v1.NewBannerMngRpcClient(realCli)
|
||
|
cli.V1Banner = v1.NewBannerRpcClient(realCli)
|
||
|
cli.V1RoomNews = v1.NewRoomNewsRpcClient(realCli)
|
||
|
}
|