Browse Source

增加查询缓存的所有站点接口

master v0.3.0
guzeng 3 years ago
parent
commit
e67b8a9602
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      site.pb.go
  2. +1
    -0
      site.proto

+ 4
- 0
site.pb.go View File

@ -100,6 +100,7 @@ func init() {
type SiteService interface { type SiteService interface {
GetConfig(in *ConfigRequest, out *ConfigResponse) error GetConfig(in *ConfigRequest, out *ConfigResponse) error
GetBalanceType(in *ConfigRequest, out *ConfigResponse) error GetBalanceType(in *ConfigRequest, out *ConfigResponse) error
GetAllSite(in *ConfigRequest, out *ConfigResponse) error
} }
// AcceptSiteServiceClient accepts connections on the listener and serves requests // AcceptSiteServiceClient accepts connections on the listener and serves requests
@ -177,6 +178,9 @@ func (c *SiteServiceClient) GetConfig(in *ConfigRequest, out *ConfigResponse) er
func (c *SiteServiceClient) GetBalanceType(in *ConfigRequest, out *ConfigResponse) error { func (c *SiteServiceClient) GetBalanceType(in *ConfigRequest, out *ConfigResponse) error {
return c.Call("SiteService.GetBalanceType", in, out) return c.Call("SiteService.GetBalanceType", in, out)
} }
func (c *SiteServiceClient) GetAllSite(in *ConfigRequest, out *ConfigResponse) error {
return c.Call("SiteService.GetAllSite", in, out)
}
// DialSiteService connects to an SiteService at the specified network address. // DialSiteService connects to an SiteService at the specified network address.
func DialSiteService(network, addr string) (*SiteServiceClient, *rpc.Client, error) { func DialSiteService(network, addr string) (*SiteServiceClient, *rpc.Client, error) {


+ 1
- 0
site.proto View File

@ -20,4 +20,5 @@ message ConfigResponse {
service SiteService { service SiteService {
rpc getConfig (ConfigRequest) returns (ConfigResponse); // rpc getConfig (ConfigRequest) returns (ConfigResponse); //
rpc getBalanceType (ConfigRequest) returns (ConfigResponse); // rpc getBalanceType (ConfigRequest) returns (ConfigResponse); //
rpc getAllSite(ConfigRequest) returns (ConfigResponse);//
} }

Loading…
Cancel
Save