mirror of
https://github.com/ayflying/p2p.git
synced 2026-03-05 01:39:23 +00:00
完成dht的分布式储存
This commit is contained in:
@@ -13,4 +13,5 @@ import (
|
||||
type IP2PV1 interface {
|
||||
Connect(ctx context.Context, req *v1.ConnectReq) (res *v1.ConnectRes, err error)
|
||||
Send(ctx context.Context, req *v1.SendReq) (res *v1.SendRes, err error)
|
||||
Ip(ctx context.Context, req *v1.IpReq) (res *v1.IpRes, err error)
|
||||
}
|
||||
|
||||
@@ -18,3 +18,10 @@ type SendReq struct {
|
||||
type SendRes struct {
|
||||
g.Meta `mime:"text/html" example:"string"`
|
||||
}
|
||||
|
||||
type IpReq struct {
|
||||
g.Meta `path:"/p2p/ip" tags:"p2p" method:"get" sm:"获取当前主机的IP地址"`
|
||||
}
|
||||
type IpRes struct {
|
||||
g.Meta `mime:"text/html" example:"string"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user