Skip to content

Commit

Permalink
addm instance id
Browse files Browse the repository at this point in the history
  • Loading branch information
deancn committed Sep 8, 2020
1 parent b436c2b commit 80f19fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/adblib/tencentcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Client struct {
*clb.Client
}

func NewCLBClient() (*Client, error){
func NewCLBClient() (*Client, error) {
secretID := os.Getenv("TENCENTCLOUD_SECRET_ID")
secretKey := os.Getenv("TENCENTCLOUD_SECRET_KEY")
region := os.Getenv("TENCENTCLOUD_REGION")
Expand Down Expand Up @@ -56,7 +56,7 @@ func (client *Client) ListCLB() {
}
}

func (client *Client)ShowRS(lbID string) {
func (client *Client) ShowRS(lbID string) {

request := clb.NewDescribeTargetsRequest()

Expand All @@ -78,10 +78,11 @@ func (client *Client)ShowRS(lbID string) {
for _, listener := range response.Response.Listeners {
for _, rule := range listener.Rules {
for _, target := range rule.Targets {
fmt.Printf("%s%s\t%d\t%s\n",
fmt.Printf("%s%s\t%d\t%s\t%s\n",
*rule.Domain,
*rule.Url,
*target.Weight,
*target.InstanceId,
*target.InstanceName,
)
}
Expand Down

0 comments on commit 80f19fe

Please sign in to comment.