From 60dab81202c65f0e0b91fad7ad58a557a6144c5a Mon Sep 17 00:00:00 2001 From: Petar Maymounkov Date: Tue, 26 Jul 2022 16:01:53 -0700 Subject: [PATCH 1/3] upgrade to go-log/v2 --- client/findproviders.go | 2 +- gen/proto/proto_edelweiss.go | 175 ++++++++++++++++++----------------- gen/routing.go | 2 +- go.mod | 9 +- go.sum | 35 ++++--- server/findproviders.go | 2 +- 6 files changed, 119 insertions(+), 106 deletions(-) diff --git a/client/findproviders.go b/client/findproviders.go index 9f0ae28..46a487a 100644 --- a/client/findproviders.go +++ b/client/findproviders.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/go-cid" proto "github.com/ipfs/go-delegated-routing/gen/proto" ipns "github.com/ipfs/go-ipns" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p-core/peer" record "github.com/libp2p/go-libp2p-record" "github.com/multiformats/go-multiaddr" diff --git a/gen/proto/proto_edelweiss.go b/gen/proto/proto_edelweiss.go index f53e9fb..c7d76f8 100644 --- a/gen/proto/proto_edelweiss.go +++ b/gen/proto/proto_edelweiss.go @@ -3,23 +3,24 @@ package proto import ( - pd8 "bytes" - pd5 "context" - pd9 "errors" + pd11 "bytes" + pd6 "context" + pd10 "errors" pd3 "fmt" + pd7 "io" + pd15 "io/ioutil" + pd5 "net/http" + pd4 "net/url" + pd14 "sync" + pd16 "github.com/ipfs/go-cid" - pd14 "github.com/ipfs/go-log" + pd13 "github.com/ipfs/go-log/v2" pd12 "github.com/ipld/edelweiss/services" pd2 "github.com/ipld/edelweiss/values" - pd6 "github.com/ipld/go-ipld-prime" - pd7 "github.com/ipld/go-ipld-prime/codec/dagjson" + pd9 "github.com/ipld/go-ipld-prime" + pd8 "github.com/ipld/go-ipld-prime/codec/dagjson" pd1 "github.com/ipld/go-ipld-prime/datamodel" pd17 "github.com/ipld/go-ipld-prime/linking/cid" - pd4 "io" - pd15 "io/ioutil" - pd11 "net/http" - pd10 "net/url" - pd13 "sync" ) // -- protocol type DelegatedRouting_IdentifyArg -- @@ -1013,24 +1014,24 @@ func (x AnonInductive5) Prototype() pd1.NodePrototype { return nil } -var logger_client_DelegatedRouting = pd14.Logger("service/client/delegatedrouting") +var logger_client_DelegatedRouting = pd13.Logger("service/client/delegatedrouting") type DelegatedRouting_Client interface { - Identify(ctx pd5.Context, req *DelegatedRouting_IdentifyArg) ([]*DelegatedRouting_IdentifyResult, error) + Identify(ctx pd6.Context, req *DelegatedRouting_IdentifyArg) ([]*DelegatedRouting_IdentifyResult, error) - FindProviders(ctx pd5.Context, req *FindProvidersRequest) ([]*FindProvidersResponse, error) + FindProviders(ctx pd6.Context, req *FindProvidersRequest) ([]*FindProvidersResponse, error) - GetIPNS(ctx pd5.Context, req *GetIPNSRequest) ([]*GetIPNSResponse, error) + GetIPNS(ctx pd6.Context, req *GetIPNSRequest) ([]*GetIPNSResponse, error) - PutIPNS(ctx pd5.Context, req *PutIPNSRequest) ([]*PutIPNSResponse, error) + PutIPNS(ctx pd6.Context, req *PutIPNSRequest) ([]*PutIPNSResponse, error) - Identify_Async(ctx pd5.Context, req *DelegatedRouting_IdentifyArg) (<-chan DelegatedRouting_Identify_AsyncResult, error) + Identify_Async(ctx pd6.Context, req *DelegatedRouting_IdentifyArg) (<-chan DelegatedRouting_Identify_AsyncResult, error) - FindProviders_Async(ctx pd5.Context, req *FindProvidersRequest) (<-chan DelegatedRouting_FindProviders_AsyncResult, error) + FindProviders_Async(ctx pd6.Context, req *FindProvidersRequest) (<-chan DelegatedRouting_FindProviders_AsyncResult, error) - GetIPNS_Async(ctx pd5.Context, req *GetIPNSRequest) (<-chan DelegatedRouting_GetIPNS_AsyncResult, error) + GetIPNS_Async(ctx pd6.Context, req *GetIPNSRequest) (<-chan DelegatedRouting_GetIPNS_AsyncResult, error) - PutIPNS_Async(ctx pd5.Context, req *PutIPNSRequest) (<-chan DelegatedRouting_PutIPNS_AsyncResult, error) + PutIPNS_Async(ctx pd6.Context, req *PutIPNSRequest) (<-chan DelegatedRouting_PutIPNS_AsyncResult, error) } type DelegatedRouting_Identify_AsyncResult struct { @@ -1056,13 +1057,13 @@ type DelegatedRouting_PutIPNS_AsyncResult struct { type DelegatedRouting_ClientOption func(*client_DelegatedRouting) error type client_DelegatedRouting struct { - httpClient *pd11.Client - endpoint *pd10.URL - ulk pd13.Mutex + httpClient *pd5.Client + endpoint *pd4.URL + ulk pd14.Mutex unsupported map[string]bool // cache of methods not supported by server } -func DelegatedRouting_Client_WithHTTPClient(hc *pd11.Client) DelegatedRouting_ClientOption { +func DelegatedRouting_Client_WithHTTPClient(hc *pd5.Client) DelegatedRouting_ClientOption { return func(c *client_DelegatedRouting) error { c.httpClient = hc return nil @@ -1070,11 +1071,11 @@ func DelegatedRouting_Client_WithHTTPClient(hc *pd11.Client) DelegatedRouting_Cl } func New_DelegatedRouting_Client(endpoint string, opts ...DelegatedRouting_ClientOption) (*client_DelegatedRouting, error) { - u, err := pd10.Parse(endpoint) + u, err := pd4.Parse(endpoint) if err != nil { return nil, err } - c := &client_DelegatedRouting{endpoint: u, httpClient: pd11.DefaultClient, unsupported: make(map[string]bool)} + c := &client_DelegatedRouting{endpoint: u, httpClient: pd5.DefaultClient, unsupported: make(map[string]bool)} for _, o := range opts { if err := o(c); err != nil { return nil, err @@ -1083,8 +1084,8 @@ func New_DelegatedRouting_Client(endpoint string, opts ...DelegatedRouting_Clien return c, nil } -func (c *client_DelegatedRouting) Identify(ctx pd5.Context, req *DelegatedRouting_IdentifyArg) ([]*DelegatedRouting_IdentifyResult, error) { - ctx, cancel := pd5.WithCancel(ctx) +func (c *client_DelegatedRouting) Identify(ctx pd6.Context, req *DelegatedRouting_IdentifyArg) ([]*DelegatedRouting_IdentifyResult, error) { + ctx, cancel := pd6.WithCancel(ctx) defer cancel() ch, err := c.Identify_Async(ctx, req) if err != nil { @@ -1112,7 +1113,7 @@ func (c *client_DelegatedRouting) Identify(ctx pd5.Context, req *DelegatedRoutin } } -func (c *client_DelegatedRouting) Identify_Async(ctx pd5.Context, req *DelegatedRouting_IdentifyArg) (<-chan DelegatedRouting_Identify_AsyncResult, error) { +func (c *client_DelegatedRouting) Identify_Async(ctx pd6.Context, req *DelegatedRouting_IdentifyArg) (<-chan DelegatedRouting_Identify_AsyncResult, error) { // check if we have memoized that this method is not supported by the server c.ulk.Lock() notSupported := c.unsupported["Identify"] @@ -1125,14 +1126,14 @@ func (c *client_DelegatedRouting) Identify_Async(ctx pd5.Context, req *Delegated Identify: req, } - buf, err := pd6.Encode(envelope, pd7.Encode) + buf, err := pd9.Encode(envelope, pd8.Encode) if err != nil { return nil, pd3.Errorf("unexpected serialization error (%v)", err) } // encode request in URL u := *c.endpoint - httpReq, err := pd11.NewRequestWithContext(ctx, "POST", u.String(), pd8.NewReader(buf)) + httpReq, err := pd5.NewRequestWithContext(ctx, "POST", u.String(), pd11.NewReader(buf)) if err != nil { return nil, err } @@ -1177,10 +1178,10 @@ func (c *client_DelegatedRouting) Identify_Async(ctx pd5.Context, req *Delegated return ch, nil } -func process_DelegatedRouting_Identify_AsyncResult(ctx pd5.Context, ch chan<- DelegatedRouting_Identify_AsyncResult, r pd4.ReadCloser) { +func process_DelegatedRouting_Identify_AsyncResult(ctx pd6.Context, ch chan<- DelegatedRouting_Identify_AsyncResult, r pd7.ReadCloser) { defer close(ch) defer r.Close() - opt := pd7.DecodeOptions{ + opt := pd8.DecodeOptions{ ParseLinks: true, ParseBytes: true, DontParseBeyondEnd: true, @@ -1188,9 +1189,9 @@ func process_DelegatedRouting_Identify_AsyncResult(ctx pd5.Context, ch chan<- De for { var out DelegatedRouting_Identify_AsyncResult - n, err := pd6.DecodeStreaming(r, opt.Decode) + n, err := pd9.DecodeStreaming(r, opt.Decode) - if pd9.Is(err, pd4.EOF) || pd9.Is(err, pd4.ErrUnexpectedEOF) || pd9.Is(err, pd5.DeadlineExceeded) || pd9.Is(err, pd5.Canceled) { + if pd10.Is(err, pd7.EOF) || pd10.Is(err, pd7.ErrUnexpectedEOF) || pd10.Is(err, pd6.DeadlineExceeded) || pd10.Is(err, pd6.Canceled) { return } @@ -1205,7 +1206,7 @@ func process_DelegatedRouting_Identify_AsyncResult(ctx pd5.Context, ch chan<- De if err = env.Parse(n); err != nil { out = DelegatedRouting_Identify_AsyncResult{Err: pd12.ErrProto{Cause: err}} // schema decode error } else if env.Error != nil { - out = DelegatedRouting_Identify_AsyncResult{Err: pd12.ErrService{Cause: pd9.New(string(env.Error.Code))}} // service-level error + out = DelegatedRouting_Identify_AsyncResult{Err: pd12.ErrService{Cause: pd10.New(string(env.Error.Code))}} // service-level error } else if env.Identify != nil { out = DelegatedRouting_Identify_AsyncResult{Resp: env.Identify} } else { @@ -1222,8 +1223,8 @@ func process_DelegatedRouting_Identify_AsyncResult(ctx pd5.Context, ch chan<- De } } -func (c *client_DelegatedRouting) FindProviders(ctx pd5.Context, req *FindProvidersRequest) ([]*FindProvidersResponse, error) { - ctx, cancel := pd5.WithCancel(ctx) +func (c *client_DelegatedRouting) FindProviders(ctx pd6.Context, req *FindProvidersRequest) ([]*FindProvidersResponse, error) { + ctx, cancel := pd6.WithCancel(ctx) defer cancel() ch, err := c.FindProviders_Async(ctx, req) if err != nil { @@ -1251,7 +1252,7 @@ func (c *client_DelegatedRouting) FindProviders(ctx pd5.Context, req *FindProvid } } -func (c *client_DelegatedRouting) FindProviders_Async(ctx pd5.Context, req *FindProvidersRequest) (<-chan DelegatedRouting_FindProviders_AsyncResult, error) { +func (c *client_DelegatedRouting) FindProviders_Async(ctx pd6.Context, req *FindProvidersRequest) (<-chan DelegatedRouting_FindProviders_AsyncResult, error) { // check if we have memoized that this method is not supported by the server c.ulk.Lock() notSupported := c.unsupported["FindProviders"] @@ -1264,14 +1265,14 @@ func (c *client_DelegatedRouting) FindProviders_Async(ctx pd5.Context, req *Find FindProviders: req, } - buf, err := pd6.Encode(envelope, pd7.Encode) + buf, err := pd9.Encode(envelope, pd8.Encode) if err != nil { return nil, pd3.Errorf("unexpected serialization error (%v)", err) } // encode request in URL u := *c.endpoint - httpReq, err := pd11.NewRequestWithContext(ctx, "POST", u.String(), pd8.NewReader(buf)) + httpReq, err := pd5.NewRequestWithContext(ctx, "POST", u.String(), pd11.NewReader(buf)) if err != nil { return nil, err } @@ -1316,10 +1317,10 @@ func (c *client_DelegatedRouting) FindProviders_Async(ctx pd5.Context, req *Find return ch, nil } -func process_DelegatedRouting_FindProviders_AsyncResult(ctx pd5.Context, ch chan<- DelegatedRouting_FindProviders_AsyncResult, r pd4.ReadCloser) { +func process_DelegatedRouting_FindProviders_AsyncResult(ctx pd6.Context, ch chan<- DelegatedRouting_FindProviders_AsyncResult, r pd7.ReadCloser) { defer close(ch) defer r.Close() - opt := pd7.DecodeOptions{ + opt := pd8.DecodeOptions{ ParseLinks: true, ParseBytes: true, DontParseBeyondEnd: true, @@ -1327,9 +1328,9 @@ func process_DelegatedRouting_FindProviders_AsyncResult(ctx pd5.Context, ch chan for { var out DelegatedRouting_FindProviders_AsyncResult - n, err := pd6.DecodeStreaming(r, opt.Decode) + n, err := pd9.DecodeStreaming(r, opt.Decode) - if pd9.Is(err, pd4.EOF) || pd9.Is(err, pd4.ErrUnexpectedEOF) || pd9.Is(err, pd5.DeadlineExceeded) || pd9.Is(err, pd5.Canceled) { + if pd10.Is(err, pd7.EOF) || pd10.Is(err, pd7.ErrUnexpectedEOF) || pd10.Is(err, pd6.DeadlineExceeded) || pd10.Is(err, pd6.Canceled) { return } @@ -1344,7 +1345,7 @@ func process_DelegatedRouting_FindProviders_AsyncResult(ctx pd5.Context, ch chan if err = env.Parse(n); err != nil { out = DelegatedRouting_FindProviders_AsyncResult{Err: pd12.ErrProto{Cause: err}} // schema decode error } else if env.Error != nil { - out = DelegatedRouting_FindProviders_AsyncResult{Err: pd12.ErrService{Cause: pd9.New(string(env.Error.Code))}} // service-level error + out = DelegatedRouting_FindProviders_AsyncResult{Err: pd12.ErrService{Cause: pd10.New(string(env.Error.Code))}} // service-level error } else if env.FindProviders != nil { out = DelegatedRouting_FindProviders_AsyncResult{Resp: env.FindProviders} } else { @@ -1361,8 +1362,8 @@ func process_DelegatedRouting_FindProviders_AsyncResult(ctx pd5.Context, ch chan } } -func (c *client_DelegatedRouting) GetIPNS(ctx pd5.Context, req *GetIPNSRequest) ([]*GetIPNSResponse, error) { - ctx, cancel := pd5.WithCancel(ctx) +func (c *client_DelegatedRouting) GetIPNS(ctx pd6.Context, req *GetIPNSRequest) ([]*GetIPNSResponse, error) { + ctx, cancel := pd6.WithCancel(ctx) defer cancel() ch, err := c.GetIPNS_Async(ctx, req) if err != nil { @@ -1390,7 +1391,7 @@ func (c *client_DelegatedRouting) GetIPNS(ctx pd5.Context, req *GetIPNSRequest) } } -func (c *client_DelegatedRouting) GetIPNS_Async(ctx pd5.Context, req *GetIPNSRequest) (<-chan DelegatedRouting_GetIPNS_AsyncResult, error) { +func (c *client_DelegatedRouting) GetIPNS_Async(ctx pd6.Context, req *GetIPNSRequest) (<-chan DelegatedRouting_GetIPNS_AsyncResult, error) { // check if we have memoized that this method is not supported by the server c.ulk.Lock() notSupported := c.unsupported["GetIPNS"] @@ -1403,14 +1404,14 @@ func (c *client_DelegatedRouting) GetIPNS_Async(ctx pd5.Context, req *GetIPNSReq GetIPNS: req, } - buf, err := pd6.Encode(envelope, pd7.Encode) + buf, err := pd9.Encode(envelope, pd8.Encode) if err != nil { return nil, pd3.Errorf("unexpected serialization error (%v)", err) } // encode request in URL u := *c.endpoint - httpReq, err := pd11.NewRequestWithContext(ctx, "POST", u.String(), pd8.NewReader(buf)) + httpReq, err := pd5.NewRequestWithContext(ctx, "POST", u.String(), pd11.NewReader(buf)) if err != nil { return nil, err } @@ -1455,10 +1456,10 @@ func (c *client_DelegatedRouting) GetIPNS_Async(ctx pd5.Context, req *GetIPNSReq return ch, nil } -func process_DelegatedRouting_GetIPNS_AsyncResult(ctx pd5.Context, ch chan<- DelegatedRouting_GetIPNS_AsyncResult, r pd4.ReadCloser) { +func process_DelegatedRouting_GetIPNS_AsyncResult(ctx pd6.Context, ch chan<- DelegatedRouting_GetIPNS_AsyncResult, r pd7.ReadCloser) { defer close(ch) defer r.Close() - opt := pd7.DecodeOptions{ + opt := pd8.DecodeOptions{ ParseLinks: true, ParseBytes: true, DontParseBeyondEnd: true, @@ -1466,9 +1467,9 @@ func process_DelegatedRouting_GetIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del for { var out DelegatedRouting_GetIPNS_AsyncResult - n, err := pd6.DecodeStreaming(r, opt.Decode) + n, err := pd9.DecodeStreaming(r, opt.Decode) - if pd9.Is(err, pd4.EOF) || pd9.Is(err, pd4.ErrUnexpectedEOF) || pd9.Is(err, pd5.DeadlineExceeded) || pd9.Is(err, pd5.Canceled) { + if pd10.Is(err, pd7.EOF) || pd10.Is(err, pd7.ErrUnexpectedEOF) || pd10.Is(err, pd6.DeadlineExceeded) || pd10.Is(err, pd6.Canceled) { return } @@ -1483,7 +1484,7 @@ func process_DelegatedRouting_GetIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del if err = env.Parse(n); err != nil { out = DelegatedRouting_GetIPNS_AsyncResult{Err: pd12.ErrProto{Cause: err}} // schema decode error } else if env.Error != nil { - out = DelegatedRouting_GetIPNS_AsyncResult{Err: pd12.ErrService{Cause: pd9.New(string(env.Error.Code))}} // service-level error + out = DelegatedRouting_GetIPNS_AsyncResult{Err: pd12.ErrService{Cause: pd10.New(string(env.Error.Code))}} // service-level error } else if env.GetIPNS != nil { out = DelegatedRouting_GetIPNS_AsyncResult{Resp: env.GetIPNS} } else { @@ -1500,8 +1501,8 @@ func process_DelegatedRouting_GetIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del } } -func (c *client_DelegatedRouting) PutIPNS(ctx pd5.Context, req *PutIPNSRequest) ([]*PutIPNSResponse, error) { - ctx, cancel := pd5.WithCancel(ctx) +func (c *client_DelegatedRouting) PutIPNS(ctx pd6.Context, req *PutIPNSRequest) ([]*PutIPNSResponse, error) { + ctx, cancel := pd6.WithCancel(ctx) defer cancel() ch, err := c.PutIPNS_Async(ctx, req) if err != nil { @@ -1529,7 +1530,7 @@ func (c *client_DelegatedRouting) PutIPNS(ctx pd5.Context, req *PutIPNSRequest) } } -func (c *client_DelegatedRouting) PutIPNS_Async(ctx pd5.Context, req *PutIPNSRequest) (<-chan DelegatedRouting_PutIPNS_AsyncResult, error) { +func (c *client_DelegatedRouting) PutIPNS_Async(ctx pd6.Context, req *PutIPNSRequest) (<-chan DelegatedRouting_PutIPNS_AsyncResult, error) { // check if we have memoized that this method is not supported by the server c.ulk.Lock() notSupported := c.unsupported["PutIPNS"] @@ -1542,14 +1543,14 @@ func (c *client_DelegatedRouting) PutIPNS_Async(ctx pd5.Context, req *PutIPNSReq PutIPNS: req, } - buf, err := pd6.Encode(envelope, pd7.Encode) + buf, err := pd9.Encode(envelope, pd8.Encode) if err != nil { return nil, pd3.Errorf("unexpected serialization error (%v)", err) } // encode request in URL u := *c.endpoint - httpReq, err := pd11.NewRequestWithContext(ctx, "POST", u.String(), pd8.NewReader(buf)) + httpReq, err := pd5.NewRequestWithContext(ctx, "POST", u.String(), pd11.NewReader(buf)) if err != nil { return nil, err } @@ -1594,10 +1595,10 @@ func (c *client_DelegatedRouting) PutIPNS_Async(ctx pd5.Context, req *PutIPNSReq return ch, nil } -func process_DelegatedRouting_PutIPNS_AsyncResult(ctx pd5.Context, ch chan<- DelegatedRouting_PutIPNS_AsyncResult, r pd4.ReadCloser) { +func process_DelegatedRouting_PutIPNS_AsyncResult(ctx pd6.Context, ch chan<- DelegatedRouting_PutIPNS_AsyncResult, r pd7.ReadCloser) { defer close(ch) defer r.Close() - opt := pd7.DecodeOptions{ + opt := pd8.DecodeOptions{ ParseLinks: true, ParseBytes: true, DontParseBeyondEnd: true, @@ -1605,9 +1606,9 @@ func process_DelegatedRouting_PutIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del for { var out DelegatedRouting_PutIPNS_AsyncResult - n, err := pd6.DecodeStreaming(r, opt.Decode) + n, err := pd9.DecodeStreaming(r, opt.Decode) - if pd9.Is(err, pd4.EOF) || pd9.Is(err, pd4.ErrUnexpectedEOF) || pd9.Is(err, pd5.DeadlineExceeded) || pd9.Is(err, pd5.Canceled) { + if pd10.Is(err, pd7.EOF) || pd10.Is(err, pd7.ErrUnexpectedEOF) || pd10.Is(err, pd6.DeadlineExceeded) || pd10.Is(err, pd6.Canceled) { return } @@ -1622,7 +1623,7 @@ func process_DelegatedRouting_PutIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del if err = env.Parse(n); err != nil { out = DelegatedRouting_PutIPNS_AsyncResult{Err: pd12.ErrProto{Cause: err}} // schema decode error } else if env.Error != nil { - out = DelegatedRouting_PutIPNS_AsyncResult{Err: pd12.ErrService{Cause: pd9.New(string(env.Error.Code))}} // service-level error + out = DelegatedRouting_PutIPNS_AsyncResult{Err: pd12.ErrService{Cause: pd10.New(string(env.Error.Code))}} // service-level error } else if env.PutIPNS != nil { out = DelegatedRouting_PutIPNS_AsyncResult{Resp: env.PutIPNS} } else { @@ -1639,16 +1640,16 @@ func process_DelegatedRouting_PutIPNS_AsyncResult(ctx pd5.Context, ch chan<- Del } } -var logger_server_DelegatedRouting = pd14.Logger("service/server/delegatedrouting") +var logger_server_DelegatedRouting = pd13.Logger("service/server/delegatedrouting") type DelegatedRouting_Server interface { - FindProviders(ctx pd5.Context, req *FindProvidersRequest) (<-chan *DelegatedRouting_FindProviders_AsyncResult, error) - GetIPNS(ctx pd5.Context, req *GetIPNSRequest) (<-chan *DelegatedRouting_GetIPNS_AsyncResult, error) - PutIPNS(ctx pd5.Context, req *PutIPNSRequest) (<-chan *DelegatedRouting_PutIPNS_AsyncResult, error) + FindProviders(ctx pd6.Context, req *FindProvidersRequest) (<-chan *DelegatedRouting_FindProviders_AsyncResult, error) + GetIPNS(ctx pd6.Context, req *GetIPNSRequest) (<-chan *DelegatedRouting_GetIPNS_AsyncResult, error) + PutIPNS(ctx pd6.Context, req *PutIPNSRequest) (<-chan *DelegatedRouting_PutIPNS_AsyncResult, error) } -func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { - return func(writer pd11.ResponseWriter, request *pd11.Request) { +func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd5.HandlerFunc { + return func(writer pd5.ResponseWriter, request *pd5.Request) { // parse request msg, err := pd15.ReadAll(request.Body) if err != nil { @@ -1656,7 +1657,7 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { writer.WriteHeader(400) return } - n, err := pd6.Decode(msg, pd7.Decode) + n, err := pd9.Decode(msg, pd8.Decode) if err != nil { logger_server_DelegatedRouting.Errorf("received request not decodeable (%v)", err) writer.WriteHeader(400) @@ -1686,7 +1687,7 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } writer.WriteHeader(200) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } @@ -1704,14 +1705,14 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } else { env = &AnonInductive5{FindProviders: resp.Resp} } - var buf pd8.Buffer - if err = pd6.EncodeStreaming(&buf, env, pd7.Encode); err != nil { + var buf pd11.Buffer + if err = pd9.EncodeStreaming(&buf, env, pd8.Encode); err != nil { logger_server_DelegatedRouting.Errorf("cannot encode response (%v)", err) continue } buf.WriteByte("\n"[0]) writer.Write(buf.Bytes()) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } } @@ -1727,7 +1728,7 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } writer.WriteHeader(200) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } @@ -1745,14 +1746,14 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } else { env = &AnonInductive5{GetIPNS: resp.Resp} } - var buf pd8.Buffer - if err = pd6.EncodeStreaming(&buf, env, pd7.Encode); err != nil { + var buf pd11.Buffer + if err = pd9.EncodeStreaming(&buf, env, pd8.Encode); err != nil { logger_server_DelegatedRouting.Errorf("cannot encode response (%v)", err) continue } buf.WriteByte("\n"[0]) writer.Write(buf.Bytes()) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } } @@ -1768,7 +1769,7 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } writer.WriteHeader(200) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } @@ -1786,14 +1787,14 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { } else { env = &AnonInductive5{PutIPNS: resp.Resp} } - var buf pd8.Buffer - if err = pd6.EncodeStreaming(&buf, env, pd7.Encode); err != nil { + var buf pd11.Buffer + if err = pd9.EncodeStreaming(&buf, env, pd8.Encode); err != nil { logger_server_DelegatedRouting.Errorf("cannot encode response (%v)", err) continue } buf.WriteByte("\n"[0]) writer.Write(buf.Bytes()) - if f, ok := writer.(pd11.Flusher); ok { + if f, ok := writer.(pd5.Flusher); ok { f.Flush() } } @@ -1810,8 +1811,8 @@ func DelegatedRouting_AsyncHandler(s DelegatedRouting_Server) pd11.HandlerFunc { }, }, } - var buf pd8.Buffer - if err = pd6.EncodeStreaming(&buf, env, pd7.Encode); err != nil { + var buf pd11.Buffer + if err = pd9.EncodeStreaming(&buf, env, pd8.Encode); err != nil { logger_server_DelegatedRouting.Errorf("cannot encode identify response (%v)", err) writer.WriteHeader(500) return diff --git a/gen/routing.go b/gen/routing.go index 5f56d3c..8ea585e 100644 --- a/gen/routing.go +++ b/gen/routing.go @@ -5,7 +5,7 @@ import ( "os" "path" - log "github.com/ipfs/go-log" + log "github.com/ipfs/go-log/v2" "github.com/ipld/edelweiss/compile" "github.com/ipld/edelweiss/defs" ) diff --git a/go.mod b/go.mod index b06b1da..5d0ca3d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,8 @@ require ( github.com/ipfs/go-cid v0.2.0 github.com/ipfs/go-ipns v0.1.2 github.com/ipfs/go-log v1.0.5 - github.com/ipld/edelweiss v0.1.4 + github.com/ipfs/go-log/v2 v2.5.1 + github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8 github.com/ipld/go-ipld-prime v0.17.0 github.com/libp2p/go-libp2p-core v0.16.1 github.com/libp2p/go-libp2p-record v0.1.3 @@ -21,10 +22,10 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/ipfs/go-ipfs-util v0.0.1 // indirect - github.com/ipfs/go-log/v2 v2.1.3 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/libp2p/go-openssl v0.0.7 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -40,8 +41,8 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.16.0 // indirect + go.uber.org/zap v1.19.1 // indirect golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf // indirect - golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect lukechampine.com/blake3 v1.1.6 // indirect ) diff --git a/go.sum b/go.sum index 79bf3df..450db25 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= @@ -94,10 +95,11 @@ github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9 github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.1.3 h1:1iS3IU7aXRlbgUpN8yTTpJ53NXYjAe37vcI5+5nYrzk= github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipld/edelweiss v0.1.4 h1:g4+C2Ph+8SV2MCJBG3oRtetvxJYAS2WzlNGgsOY95iM= -github.com/ipld/edelweiss v0.1.4/go.mod h1:JX1MR06BPcTOF+5xCYDLnylYkXS15iUN0/RXVSiUIQs= +github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= +github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8 h1:iOaL/iDAlElElZEIpEz7zHe6+rJS3JPCd7po39+2vdg= +github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8/go.mod h1:MyVN0QE28uDtwE8z5KqBrlk/SJVfqn8upVq18wPRlMk= github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.17.0 h1:+U2peiA3aQsE7mrXjD2nYZaZrCcakoz2Wge8K42Ld8g= github.com/ipld/go-ipld-prime v0.17.0/go.mod h1:aYcKm5TIvGfY8P3QBKz/2gKcLxzJ1zDaD+o0bOowhgs= @@ -157,6 +159,8 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -260,6 +264,7 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7V github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -267,13 +272,16 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -292,12 +300,11 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -310,6 +317,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -317,6 +325,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -330,8 +339,11 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -351,12 +363,11 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -377,10 +388,10 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= diff --git a/server/findproviders.go b/server/findproviders.go index aef030e..1418c24 100644 --- a/server/findproviders.go +++ b/server/findproviders.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-delegated-routing/client" proto "github.com/ipfs/go-delegated-routing/gen/proto" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" "github.com/ipld/edelweiss/values" "github.com/libp2p/go-libp2p-core/peer" ) From 6131fcf5e03d9104c51c934260acb58c51e54313 Mon Sep 17 00:00:00 2001 From: Petar Maymounkov Date: Tue, 26 Jul 2022 16:03:59 -0700 Subject: [PATCH 2/3] go mod tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5d0ca3d..40d8a98 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.17 require ( github.com/ipfs/go-cid v0.2.0 github.com/ipfs/go-ipns v0.1.2 - github.com/ipfs/go-log v1.0.5 github.com/ipfs/go-log/v2 v2.5.1 github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8 github.com/ipld/go-ipld-prime v0.17.0 @@ -22,6 +21,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/ipfs/go-ipfs-util v0.0.1 // indirect + github.com/ipfs/go-log v1.0.5 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/libp2p/go-openssl v0.0.7 // indirect From b89e328afb0bb67f3b2cc4f45a7ce933204e64bf Mon Sep 17 00:00:00 2001 From: Petar Maymounkov Date: Wed, 27 Jul 2022 12:31:19 -0700 Subject: [PATCH 3/3] go mod tidy --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 40d8a98..ec47765 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/ipfs/go-cid v0.2.0 github.com/ipfs/go-ipns v0.1.2 github.com/ipfs/go-log/v2 v2.5.1 - github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8 + github.com/ipld/edelweiss v0.1.5 github.com/ipld/go-ipld-prime v0.17.0 github.com/libp2p/go-libp2p-core v0.16.1 github.com/libp2p/go-libp2p-record v0.1.3 diff --git a/go.sum b/go.sum index 450db25..9e545c7 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,8 @@ github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscw github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8 h1:iOaL/iDAlElElZEIpEz7zHe6+rJS3JPCd7po39+2vdg= -github.com/ipld/edelweiss v0.1.5-0.20220726225605-625345fdc3f8/go.mod h1:MyVN0QE28uDtwE8z5KqBrlk/SJVfqn8upVq18wPRlMk= +github.com/ipld/edelweiss v0.1.5 h1:NxsTAuaB2R+k7NweBWtUauMIRrQVjvwoyS7N9Qi+v/o= +github.com/ipld/edelweiss v0.1.5/go.mod h1:IVSfo5e7vJrTKKRjR1lrtfgc2UbEMvvatNycfH9fRfY= github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.17.0 h1:+U2peiA3aQsE7mrXjD2nYZaZrCcakoz2Wge8K42Ld8g= github.com/ipld/go-ipld-prime v0.17.0/go.mod h1:aYcKm5TIvGfY8P3QBKz/2gKcLxzJ1zDaD+o0bOowhgs=