修改入口文件

This commit is contained in:
zyj
2025-08-30 17:42:50 +08:00
parent 50f5c0f13b
commit 7afd1fdfcb
4 changed files with 59 additions and 22 deletions

24
libs/client.go Normal file
View File

@@ -0,0 +1,24 @@
package libs
import (
"sync"
"github.com/libp2p/go-libp2p/core/host"
)
type Client struct {
This host.Host
}
var once sync.Once
var clientObj *Client
func InitClient() *Client {
once.Do(func() {
clientObj = &Client{}
})
return clientObj
}

1
libs/websocks.go Normal file
View File

@@ -0,0 +1 @@
package libs