You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
// 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/rankdb/api/liverpc/v1" |
|
"go-common/library/net/rpc/liverpc" |
|
) |
|
|
|
// Client that represents a liverpc rankdb service api |
|
type Client struct { |
|
cli *liverpc.Client |
|
// V1Rank2018 presents the controller in liverpc |
|
V1Rank2018 v1.Rank2018 |
|
// V1UserRank presents the controller in liverpc |
|
V1UserRank v1.UserRank |
|
} |
|
|
|
// DiscoveryAppId the discovery id is not the tree name |
|
var DiscoveryAppId = "live.rankdb" |
|
|
|
// New a Client that represents a liverpc live.rankdb 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.V1Rank2018 = v1.NewRank2018RpcClient(realCli) |
|
cli.V1UserRank = v1.NewUserRankRpcClient(realCli) |
|
}
|
|
|