feat 服务发现模块

This commit is contained in:
2026-01-18 00:08:57 +08:00
parent 5b6a3a6b42
commit c293f9688a
4 changed files with 16 additions and 14 deletions

View File

@@ -41,7 +41,7 @@ func NewClient(httpAddr, websocketAddr string) *Client {
func (c *Client) Start() {
go func() {
data := fmt.Sprintf(`{"phone": "%v", "code": "1234"}`, utils.SnowflakeInstance().Generate().String())
resp, err := http.Post(c.httpAddr+"/gw/login", "application/json", bytes.NewBufferString(data))
resp, err := http.Post(c.httpAddr+"/gw/open/login", "application/json", bytes.NewBufferString(data))
if err != nil {
log.Errorf("POST request failed: %v\n", err)
return