Skip to content

Commit

Permalink
Merge pull request #2627 from iotaledger/feat/move-stream-to-hive
Browse files Browse the repository at this point in the history
Move stream package to hive.go
  • Loading branch information
alexsporn authored Apr 19, 2023
2 parents 46cc193 + 992aa92 commit c20ba02
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 289 deletions.
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ require (
github.com/go-resty/resty/v2 v2.6.0
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.4.2
github.com/iotaledger/hive.go/ads v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/app v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/autopeering v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/constraints v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/crypto v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/ds v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/kvstore v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/lo v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/logger v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/runtime v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/stringify v0.0.0-20230406084657-747278ebc1f6
github.com/iotaledger/hive.go/ads v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/app v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/autopeering v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/constraints v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/crypto v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/ds v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/kvstore v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/lo v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/logger v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/runtime v0.0.0-20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230411104612-2f6b2cb26cf1
github.com/iotaledger/hive.go/stringify v0.0.0-20230411104612-2f6b2cb26cf1
github.com/jellydator/ttlcache/v2 v2.11.1
github.com/labstack/echo/v4 v4.10.0
github.com/libp2p/go-libp2p v0.26.2
Expand All @@ -46,7 +46,7 @@ require (
go.dedis.ch/kyber/v3 v3.1.0
go.uber.org/atomic v1.10.0
go.uber.org/dig v1.16.1
golang.org/x/crypto v0.7.0
golang.org/x/crypto v0.8.0
golang.org/x/sync v0.1.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
google.golang.org/protobuf v1.29.1
Expand Down Expand Up @@ -179,10 +179,10 @@ require (
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
72 changes: 36 additions & 36 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -445,34 +445,34 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
github.com/iotaledger/hive.go/ads v0.0.0-20230406084657-747278ebc1f6 h1:FwlYO0hduknm9bFnoZOmouzBFWG4S18Q3ia+MFLJEvg=
github.com/iotaledger/hive.go/ads v0.0.0-20230406084657-747278ebc1f6/go.mod h1:C3itLG2CB+E8tEaglLp/rluE8abBCVDjahKiQDIjRZ4=
github.com/iotaledger/hive.go/app v0.0.0-20230406084657-747278ebc1f6 h1:Kbwpk3Zgq8Lj3WQ9BKs5YTzaFXPlnSO+SthisjM5yBU=
github.com/iotaledger/hive.go/app v0.0.0-20230406084657-747278ebc1f6/go.mod h1:jqVg4/+MkQkYt4WuX0yBzNu9EtIRdf29m+scw2Y978U=
github.com/iotaledger/hive.go/autopeering v0.0.0-20230406084657-747278ebc1f6 h1:5tOwys0PEDxm9IdJmc06/DKBVkgYItR2WEqi/E4jVZg=
github.com/iotaledger/hive.go/autopeering v0.0.0-20230406084657-747278ebc1f6/go.mod h1:u+A1qdhkhbPD1d51ynVI+N2eUSIZj1zUx8FSYCcreLA=
github.com/iotaledger/hive.go/constraints v0.0.0-20230406084657-747278ebc1f6 h1:kkJJ2jWi2Ky+H7fBjUEAAMBc2slVJ102qhcGsOwTEq8=
github.com/iotaledger/hive.go/constraints v0.0.0-20230406084657-747278ebc1f6/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230406084657-747278ebc1f6 h1:k9lRABeOvJQVLjWeNbRtDm30Jb/d+D7pwjMQuTzV3fc=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230406084657-747278ebc1f6/go.mod h1:sLgPqPn4XP4f1la0ekS2C3mXjvIQGm0UdRGIZNUVmOg=
github.com/iotaledger/hive.go/crypto v0.0.0-20230406084657-747278ebc1f6 h1:Y30OFIufUFY5HqjjT5OQSgdksXDRVL70n9hTQrBuOrg=
github.com/iotaledger/hive.go/crypto v0.0.0-20230406084657-747278ebc1f6/go.mod h1:KUuP5Wy9ny5ozzMpe73j4hU/ZotR7h1kvphWdLqPEv8=
github.com/iotaledger/hive.go/ds v0.0.0-20230406084657-747278ebc1f6 h1:om7eGHv3uII9zGtqEi208t1MrZkmMzOoVrfN8YsT9n4=
github.com/iotaledger/hive.go/ds v0.0.0-20230406084657-747278ebc1f6/go.mod h1:q57cglgRfX5PUQDNmyBWyD24605cJxkF87YrHHlRkZ4=
github.com/iotaledger/hive.go/kvstore v0.0.0-20230406084657-747278ebc1f6 h1:zKEr/O8pnUPqr8BCUD7Q3Ib2JSicyUSLS1dtjxJo284=
github.com/iotaledger/hive.go/kvstore v0.0.0-20230406084657-747278ebc1f6/go.mod h1:EZspQOO7MgaoqguZonjJdc1MiIHFVtwLTCn9Ixv6kDs=
github.com/iotaledger/hive.go/lo v0.0.0-20230406084657-747278ebc1f6 h1:d9BKW4v97tfY9ClkErucMWClJmRMZ75pjzzunu75Na4=
github.com/iotaledger/hive.go/lo v0.0.0-20230406084657-747278ebc1f6/go.mod h1:uSutXkQsFJQwrSeDNQVSQjB59XRLVKpJhr1afi8nd0g=
github.com/iotaledger/hive.go/logger v0.0.0-20230406084657-747278ebc1f6 h1:MRb7Jqf0MIb50Dgp1kjMYHCqXd4j9SaQ+JtcJzG/d2M=
github.com/iotaledger/hive.go/logger v0.0.0-20230406084657-747278ebc1f6/go.mod h1:ULSVRCrvhv5lNP/08p4V+zJ3mwlQmB+OjIvw1fU3RA8=
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230406084657-747278ebc1f6 h1:qaQhyBscq7qvX8wjaYSZ8xnXJ6/9dv/X/nqG3rQFwIE=
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230406084657-747278ebc1f6/go.mod h1:cz1XaNr8kq92rEcdUtvEB/246G63u5IxamZyWwlAy0s=
github.com/iotaledger/hive.go/runtime v0.0.0-20230406084657-747278ebc1f6 h1:wS/f2K2qM0A86AKv6VyLk/I6ljaqwuPlDN/hxvLtIhM=
github.com/iotaledger/hive.go/runtime v0.0.0-20230406084657-747278ebc1f6/go.mod h1:4Xmdd62NtiHvoYEMN/6FNvgdFXam/jssFFBD/SIFGiU=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230406084657-747278ebc1f6 h1:zS8iXD57n3vQvxyzKdL0Yab9t3RYgVmNKwZaMfvwWPQ=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230406084657-747278ebc1f6/go.mod h1:qOdUpN96qvcebn/2kWj1qs/3xjaFwVStM9o7jTx4OgI=
github.com/iotaledger/hive.go/stringify v0.0.0-20230406084657-747278ebc1f6 h1:dH07qXCSD83NbsZ5AzI+qgbyN7rQiuqQwlinGjF1TSQ=
github.com/iotaledger/hive.go/stringify v0.0.0-20230406084657-747278ebc1f6/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c=
github.com/iotaledger/hive.go/ads v0.0.0-20230411104612-2f6b2cb26cf1 h1:tGxIH70N1D669DuUoCmBSxQ7yDoFetTtLyWCdtus90I=
github.com/iotaledger/hive.go/ads v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:rKynLZNU5scID7xRLn019UBk18Eog/ru6WAuV5jJl6o=
github.com/iotaledger/hive.go/app v0.0.0-20230411104612-2f6b2cb26cf1 h1:YJBxAM/xCUX99Hh5BprsuPwyQSMDN2Fwl6p1Rsxt1C8=
github.com/iotaledger/hive.go/app v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:jqVg4/+MkQkYt4WuX0yBzNu9EtIRdf29m+scw2Y978U=
github.com/iotaledger/hive.go/autopeering v0.0.0-20230411104612-2f6b2cb26cf1 h1:mIkozd5aJthH6yiIPatnOucQG3YE8KEFyG3CUFgMxvA=
github.com/iotaledger/hive.go/autopeering v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:u+A1qdhkhbPD1d51ynVI+N2eUSIZj1zUx8FSYCcreLA=
github.com/iotaledger/hive.go/constraints v0.0.0-20230411104612-2f6b2cb26cf1 h1:mKnyXO/RA0KT9Xwd6pFvN5D8FQybjonBWeJld9XrykY=
github.com/iotaledger/hive.go/constraints v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230411104612-2f6b2cb26cf1 h1:7MZuKvkqanESYniQeHnYqtSmnTDuaRjhQl8tfCEdu/I=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230411104612-2f6b2cb26cf1/go.mod h1:sLgPqPn4XP4f1la0ekS2C3mXjvIQGm0UdRGIZNUVmOg=
github.com/iotaledger/hive.go/crypto v0.0.0-20230411104612-2f6b2cb26cf1 h1:WE4GhliEx8fy428vXtG7xKR67qJcCFnWG/PO3CUjD3I=
github.com/iotaledger/hive.go/crypto v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:KUuP5Wy9ny5ozzMpe73j4hU/ZotR7h1kvphWdLqPEv8=
github.com/iotaledger/hive.go/ds v0.0.0-20230411104612-2f6b2cb26cf1 h1:RoWh9evMBIcNtQo+R2ARLSVZTr4gxCdTJSLLDrrnTwg=
github.com/iotaledger/hive.go/ds v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:q57cglgRfX5PUQDNmyBWyD24605cJxkF87YrHHlRkZ4=
github.com/iotaledger/hive.go/kvstore v0.0.0-20230411104612-2f6b2cb26cf1 h1:qZ8BcEf2l84fwpxkAo2oDe1pcdX1+7nIyAZjTy3aPls=
github.com/iotaledger/hive.go/kvstore v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:u4PhiCaqXU2ghgYQNpPRLT5s+7fUeolBSHwgGJewEnU=
github.com/iotaledger/hive.go/lo v0.0.0-20230411104612-2f6b2cb26cf1 h1:w0XReT/MFAt74Dw/2UXP/XH7Xw+qnx7iLBP9oM5RmGQ=
github.com/iotaledger/hive.go/lo v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:uSutXkQsFJQwrSeDNQVSQjB59XRLVKpJhr1afi8nd0g=
github.com/iotaledger/hive.go/logger v0.0.0-20230411104612-2f6b2cb26cf1 h1:mUb7pOteJNwckVuFUbo5PDNa9Q0XhRm0DgC1VmoOmjI=
github.com/iotaledger/hive.go/logger v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:ULSVRCrvhv5lNP/08p4V+zJ3mwlQmB+OjIvw1fU3RA8=
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230411104612-2f6b2cb26cf1 h1:LRTNpHxtHCkW6lDLvNh+9N/PY/Tv18+0aOOmnr53l6Q=
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:cz1XaNr8kq92rEcdUtvEB/246G63u5IxamZyWwlAy0s=
github.com/iotaledger/hive.go/runtime v0.0.0-20230411104612-2f6b2cb26cf1 h1:izCq9i5N5k9R5q4PVnew4/uaLWu5WBeoyIGg3F9HGyg=
github.com/iotaledger/hive.go/runtime v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:4Xmdd62NtiHvoYEMN/6FNvgdFXam/jssFFBD/SIFGiU=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230411104612-2f6b2cb26cf1 h1:lv08fRw8N/tCd2Jv2tuBaCsRJOMYAeklEh92shAQH2A=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230411104612-2f6b2cb26cf1/go.mod h1:qOdUpN96qvcebn/2kWj1qs/3xjaFwVStM9o7jTx4OgI=
github.com/iotaledger/hive.go/stringify v0.0.0-20230411104612-2f6b2cb26cf1 h1:4rBN4BIwDfFDFtnJXYj3TLZXgS9tq8zngAI3A4/D5Vg=
github.com/iotaledger/hive.go/stringify v0.0.0-20230411104612-2f6b2cb26cf1/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c=
github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc=
github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw=
github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=
Expand Down Expand Up @@ -1030,8 +1030,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -1121,8 +1121,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -1239,8 +1239,8 @@ golang.org/x/sys v0.7.0/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/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -1251,8 +1251,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
8 changes: 4 additions & 4 deletions packages/core/database/persistentstorage.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package database

import (
"github.com/iotaledger/hive.go/constraints"
"github.com/iotaledger/hive.go/core/slot"
"github.com/iotaledger/hive.go/kvstore"
"github.com/iotaledger/hive.go/serializer/v2"
)

type PersistentSlotStorage[K, V any, KPtr IndexedKey[K], VPtr constraints.MarshalablePtr[V]] struct {
type PersistentSlotStorage[K, V any, KPtr IndexedKey[K], VPtr serializer.MarshalablePtr[V]] struct {
dbManager *Manager
realm kvstore.Realm
}

func NewPersistentSlotStorage[K, V any, KPtr IndexedKey[K], VPtr constraints.MarshalablePtr[V]](dbManager *Manager, realm kvstore.Realm) *PersistentSlotStorage[K, V, KPtr, VPtr] {
func NewPersistentSlotStorage[K, V any, KPtr IndexedKey[K], VPtr serializer.MarshalablePtr[V]](dbManager *Manager, realm kvstore.Realm) *PersistentSlotStorage[K, V, KPtr, VPtr] {
return &PersistentSlotStorage[K, V, KPtr, VPtr]{
dbManager: dbManager,
realm: realm,
Expand Down Expand Up @@ -39,5 +39,5 @@ func (p *PersistentSlotStorage[K, V, KPtr, VPtr]) Iterate(index slot.Index, call

type IndexedKey[A any] interface {
slot.IndexedID
constraints.MarshalablePtr[A]
serializer.MarshalablePtr[A]
}
8 changes: 4 additions & 4 deletions packages/core/storable/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import (

"github.com/pkg/errors"

"github.com/iotaledger/hive.go/constraints"
"github.com/iotaledger/hive.go/runtime/options"
"github.com/iotaledger/hive.go/serializer/v2"
"github.com/iotaledger/hive.go/serializer/v2/serix"
)

const SliceOffsetAuto = ^int(0)

type Slice[A any, B constraints.MarshalablePtr[A]] struct {
type Slice[A any, B serializer.MarshalablePtr[A]] struct {
fileHandle *os.File
startOffset int
entrySize int

sync.RWMutex
}

func NewSlice[A any, B constraints.MarshalablePtr[A]](fileName string, entrySize int, opts ...options.Option[Slice[A, B]]) (indexedFile *Slice[A, B], err error) {
func NewSlice[A any, B serializer.MarshalablePtr[A]](fileName string, entrySize int, opts ...options.Option[Slice[A, B]]) (indexedFile *Slice[A, B], err error) {
return options.Apply(new(Slice[A, B]), opts, func(i *Slice[A, B]) {
if i.fileHandle, err = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE, 0o666); err != nil {
err = errors.Wrap(err, "failed to open file")
Expand Down Expand Up @@ -138,7 +138,7 @@ func (i *Slice[A, B]) writeHeader() (err error) {
return i.fileHandle.Sync()
}

func WithOffset[A any, B constraints.MarshalablePtr[A]](offset int) options.Option[Slice[A, B]] {
func WithOffset[A any, B serializer.MarshalablePtr[A]](offset int) options.Option[Slice[A, B]] {
return func(s *Slice[A, B]) {
s.startOffset = offset
}
Expand Down
20 changes: 0 additions & 20 deletions packages/core/stream/offset.go

This file was deleted.

Loading

0 comments on commit c20ba02

Please sign in to comment.