starpc 0.0.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -0
- package/Makefile +140 -0
- package/README.md +128 -26
- package/dist/echo/echo.d.ts +59 -0
- package/dist/echo/echo.js +85 -0
- package/dist/srpc/broadcast-channel.d.ts +16 -0
- package/dist/srpc/broadcast-channel.js +60 -0
- package/dist/srpc/client-rpc.d.ts +31 -0
- package/dist/srpc/client-rpc.js +176 -0
- package/dist/srpc/client.d.ts +12 -0
- package/dist/srpc/client.js +129 -0
- package/dist/srpc/conn.d.ts +14 -0
- package/dist/srpc/conn.js +38 -0
- package/dist/srpc/index.d.ts +3 -0
- package/dist/srpc/index.js +2 -0
- package/dist/srpc/packet.d.ts +9 -0
- package/dist/srpc/packet.js +89 -0
- package/dist/srpc/rpcproto.d.ts +194 -0
- package/dist/srpc/rpcproto.js +322 -0
- package/dist/srpc/stream.d.ts +5 -0
- package/dist/srpc/stream.js +1 -0
- package/dist/srpc/ts-proto-rpc.d.ts +7 -0
- package/dist/srpc/ts-proto-rpc.js +1 -0
- package/dist/srpc/websocket.d.ts +7 -0
- package/dist/srpc/websocket.js +18 -0
- package/e2e/e2e.go +1 -0
- package/e2e/e2e_test.go +158 -0
- package/echo/echo.go +1 -0
- package/echo/echo.pb.go +165 -0
- package/echo/echo.proto +19 -0
- package/echo/echo.ts +191 -0
- package/echo/echo_srpc.pb.go +333 -0
- package/echo/echo_vtproto.pb.go +271 -0
- package/echo/server.go +73 -0
- package/go.mod +50 -0
- package/go.sum +210 -0
- package/integration/integration.bash +25 -0
- package/integration/integration.go +30 -0
- package/integration/integration.ts +54 -0
- package/integration/tsconfig.json +11 -0
- package/package.json +77 -9
- package/patches/@libp2p+mplex+1.2.1.patch +22 -0
- package/srpc/broadcast-channel.ts +72 -0
- package/srpc/client-rpc.go +163 -0
- package/srpc/client-rpc.ts +197 -0
- package/srpc/client.go +96 -0
- package/srpc/client.ts +182 -0
- package/srpc/conn.go +7 -0
- package/srpc/conn.ts +49 -0
- package/srpc/errors.go +20 -0
- package/srpc/handler.go +13 -0
- package/srpc/index.ts +3 -0
- package/srpc/message.go +7 -0
- package/srpc/mux.go +76 -0
- package/srpc/packet-rw.go +102 -0
- package/srpc/packet.go +71 -0
- package/srpc/packet.ts +105 -0
- package/srpc/rpc-stream.go +76 -0
- package/srpc/rpcproto.pb.go +455 -0
- package/srpc/rpcproto.proto +46 -0
- package/srpc/rpcproto.ts +467 -0
- package/srpc/rpcproto_vtproto.pb.go +1094 -0
- package/srpc/server-http.go +66 -0
- package/srpc/server-pipe.go +26 -0
- package/srpc/server-rpc.go +160 -0
- package/srpc/server.go +29 -0
- package/srpc/stream-pipe.go +86 -0
- package/srpc/stream.go +24 -0
- package/srpc/stream.ts +11 -0
- package/srpc/ts-proto-rpc.ts +29 -0
- package/srpc/websocket.go +68 -0
- package/srpc/websocket.ts +22 -0
- package/srpc/writer.go +9 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
|
|
2
|
+
// protoc-gen-go-vtproto version: v0.3.1-0.20220531071333-dfd3d322ffb6
|
|
3
|
+
// source: github.com/aperturerobotics/starpc/echo/echo.proto
|
|
4
|
+
|
|
5
|
+
package echo
|
|
6
|
+
|
|
7
|
+
import (
|
|
8
|
+
fmt "fmt"
|
|
9
|
+
io "io"
|
|
10
|
+
bits "math/bits"
|
|
11
|
+
|
|
12
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
const (
|
|
16
|
+
// Verify that this generated code is sufficiently up-to-date.
|
|
17
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
18
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
19
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
func (this *EchoMsg) EqualVT(that *EchoMsg) bool {
|
|
23
|
+
if this == nil {
|
|
24
|
+
return that == nil || that.String() == ""
|
|
25
|
+
} else if that == nil {
|
|
26
|
+
return this.String() == ""
|
|
27
|
+
}
|
|
28
|
+
if this.Body != that.Body {
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
return string(this.unknownFields) == string(that.unknownFields)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
func (m *EchoMsg) MarshalVT() (dAtA []byte, err error) {
|
|
35
|
+
if m == nil {
|
|
36
|
+
return nil, nil
|
|
37
|
+
}
|
|
38
|
+
size := m.SizeVT()
|
|
39
|
+
dAtA = make([]byte, size)
|
|
40
|
+
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
|
41
|
+
if err != nil {
|
|
42
|
+
return nil, err
|
|
43
|
+
}
|
|
44
|
+
return dAtA[:n], nil
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func (m *EchoMsg) MarshalToVT(dAtA []byte) (int, error) {
|
|
48
|
+
size := m.SizeVT()
|
|
49
|
+
return m.MarshalToSizedBufferVT(dAtA[:size])
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
func (m *EchoMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|
53
|
+
if m == nil {
|
|
54
|
+
return 0, nil
|
|
55
|
+
}
|
|
56
|
+
i := len(dAtA)
|
|
57
|
+
_ = i
|
|
58
|
+
var l int
|
|
59
|
+
_ = l
|
|
60
|
+
if m.unknownFields != nil {
|
|
61
|
+
i -= len(m.unknownFields)
|
|
62
|
+
copy(dAtA[i:], m.unknownFields)
|
|
63
|
+
}
|
|
64
|
+
if len(m.Body) > 0 {
|
|
65
|
+
i -= len(m.Body)
|
|
66
|
+
copy(dAtA[i:], m.Body)
|
|
67
|
+
i = encodeVarint(dAtA, i, uint64(len(m.Body)))
|
|
68
|
+
i--
|
|
69
|
+
dAtA[i] = 0xa
|
|
70
|
+
}
|
|
71
|
+
return len(dAtA) - i, nil
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
func encodeVarint(dAtA []byte, offset int, v uint64) int {
|
|
75
|
+
offset -= sov(v)
|
|
76
|
+
base := offset
|
|
77
|
+
for v >= 1<<7 {
|
|
78
|
+
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
79
|
+
v >>= 7
|
|
80
|
+
offset++
|
|
81
|
+
}
|
|
82
|
+
dAtA[offset] = uint8(v)
|
|
83
|
+
return base
|
|
84
|
+
}
|
|
85
|
+
func (m *EchoMsg) SizeVT() (n int) {
|
|
86
|
+
if m == nil {
|
|
87
|
+
return 0
|
|
88
|
+
}
|
|
89
|
+
var l int
|
|
90
|
+
_ = l
|
|
91
|
+
l = len(m.Body)
|
|
92
|
+
if l > 0 {
|
|
93
|
+
n += 1 + l + sov(uint64(l))
|
|
94
|
+
}
|
|
95
|
+
n += len(m.unknownFields)
|
|
96
|
+
return n
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
func sov(x uint64) (n int) {
|
|
100
|
+
return (bits.Len64(x|1) + 6) / 7
|
|
101
|
+
}
|
|
102
|
+
func soz(x uint64) (n int) {
|
|
103
|
+
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
104
|
+
}
|
|
105
|
+
func (m *EchoMsg) UnmarshalVT(dAtA []byte) error {
|
|
106
|
+
l := len(dAtA)
|
|
107
|
+
iNdEx := 0
|
|
108
|
+
for iNdEx < l {
|
|
109
|
+
preIndex := iNdEx
|
|
110
|
+
var wire uint64
|
|
111
|
+
for shift := uint(0); ; shift += 7 {
|
|
112
|
+
if shift >= 64 {
|
|
113
|
+
return ErrIntOverflow
|
|
114
|
+
}
|
|
115
|
+
if iNdEx >= l {
|
|
116
|
+
return io.ErrUnexpectedEOF
|
|
117
|
+
}
|
|
118
|
+
b := dAtA[iNdEx]
|
|
119
|
+
iNdEx++
|
|
120
|
+
wire |= uint64(b&0x7F) << shift
|
|
121
|
+
if b < 0x80 {
|
|
122
|
+
break
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
fieldNum := int32(wire >> 3)
|
|
126
|
+
wireType := int(wire & 0x7)
|
|
127
|
+
if wireType == 4 {
|
|
128
|
+
return fmt.Errorf("proto: EchoMsg: wiretype end group for non-group")
|
|
129
|
+
}
|
|
130
|
+
if fieldNum <= 0 {
|
|
131
|
+
return fmt.Errorf("proto: EchoMsg: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
132
|
+
}
|
|
133
|
+
switch fieldNum {
|
|
134
|
+
case 1:
|
|
135
|
+
if wireType != 2 {
|
|
136
|
+
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
|
137
|
+
}
|
|
138
|
+
var stringLen uint64
|
|
139
|
+
for shift := uint(0); ; shift += 7 {
|
|
140
|
+
if shift >= 64 {
|
|
141
|
+
return ErrIntOverflow
|
|
142
|
+
}
|
|
143
|
+
if iNdEx >= l {
|
|
144
|
+
return io.ErrUnexpectedEOF
|
|
145
|
+
}
|
|
146
|
+
b := dAtA[iNdEx]
|
|
147
|
+
iNdEx++
|
|
148
|
+
stringLen |= uint64(b&0x7F) << shift
|
|
149
|
+
if b < 0x80 {
|
|
150
|
+
break
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
intStringLen := int(stringLen)
|
|
154
|
+
if intStringLen < 0 {
|
|
155
|
+
return ErrInvalidLength
|
|
156
|
+
}
|
|
157
|
+
postIndex := iNdEx + intStringLen
|
|
158
|
+
if postIndex < 0 {
|
|
159
|
+
return ErrInvalidLength
|
|
160
|
+
}
|
|
161
|
+
if postIndex > l {
|
|
162
|
+
return io.ErrUnexpectedEOF
|
|
163
|
+
}
|
|
164
|
+
m.Body = string(dAtA[iNdEx:postIndex])
|
|
165
|
+
iNdEx = postIndex
|
|
166
|
+
default:
|
|
167
|
+
iNdEx = preIndex
|
|
168
|
+
skippy, err := skip(dAtA[iNdEx:])
|
|
169
|
+
if err != nil {
|
|
170
|
+
return err
|
|
171
|
+
}
|
|
172
|
+
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
173
|
+
return ErrInvalidLength
|
|
174
|
+
}
|
|
175
|
+
if (iNdEx + skippy) > l {
|
|
176
|
+
return io.ErrUnexpectedEOF
|
|
177
|
+
}
|
|
178
|
+
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
179
|
+
iNdEx += skippy
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if iNdEx > l {
|
|
184
|
+
return io.ErrUnexpectedEOF
|
|
185
|
+
}
|
|
186
|
+
return nil
|
|
187
|
+
}
|
|
188
|
+
func skip(dAtA []byte) (n int, err error) {
|
|
189
|
+
l := len(dAtA)
|
|
190
|
+
iNdEx := 0
|
|
191
|
+
depth := 0
|
|
192
|
+
for iNdEx < l {
|
|
193
|
+
var wire uint64
|
|
194
|
+
for shift := uint(0); ; shift += 7 {
|
|
195
|
+
if shift >= 64 {
|
|
196
|
+
return 0, ErrIntOverflow
|
|
197
|
+
}
|
|
198
|
+
if iNdEx >= l {
|
|
199
|
+
return 0, io.ErrUnexpectedEOF
|
|
200
|
+
}
|
|
201
|
+
b := dAtA[iNdEx]
|
|
202
|
+
iNdEx++
|
|
203
|
+
wire |= (uint64(b) & 0x7F) << shift
|
|
204
|
+
if b < 0x80 {
|
|
205
|
+
break
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
wireType := int(wire & 0x7)
|
|
209
|
+
switch wireType {
|
|
210
|
+
case 0:
|
|
211
|
+
for shift := uint(0); ; shift += 7 {
|
|
212
|
+
if shift >= 64 {
|
|
213
|
+
return 0, ErrIntOverflow
|
|
214
|
+
}
|
|
215
|
+
if iNdEx >= l {
|
|
216
|
+
return 0, io.ErrUnexpectedEOF
|
|
217
|
+
}
|
|
218
|
+
iNdEx++
|
|
219
|
+
if dAtA[iNdEx-1] < 0x80 {
|
|
220
|
+
break
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
case 1:
|
|
224
|
+
iNdEx += 8
|
|
225
|
+
case 2:
|
|
226
|
+
var length int
|
|
227
|
+
for shift := uint(0); ; shift += 7 {
|
|
228
|
+
if shift >= 64 {
|
|
229
|
+
return 0, ErrIntOverflow
|
|
230
|
+
}
|
|
231
|
+
if iNdEx >= l {
|
|
232
|
+
return 0, io.ErrUnexpectedEOF
|
|
233
|
+
}
|
|
234
|
+
b := dAtA[iNdEx]
|
|
235
|
+
iNdEx++
|
|
236
|
+
length |= (int(b) & 0x7F) << shift
|
|
237
|
+
if b < 0x80 {
|
|
238
|
+
break
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if length < 0 {
|
|
242
|
+
return 0, ErrInvalidLength
|
|
243
|
+
}
|
|
244
|
+
iNdEx += length
|
|
245
|
+
case 3:
|
|
246
|
+
depth++
|
|
247
|
+
case 4:
|
|
248
|
+
if depth == 0 {
|
|
249
|
+
return 0, ErrUnexpectedEndOfGroup
|
|
250
|
+
}
|
|
251
|
+
depth--
|
|
252
|
+
case 5:
|
|
253
|
+
iNdEx += 4
|
|
254
|
+
default:
|
|
255
|
+
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
256
|
+
}
|
|
257
|
+
if iNdEx < 0 {
|
|
258
|
+
return 0, ErrInvalidLength
|
|
259
|
+
}
|
|
260
|
+
if depth == 0 {
|
|
261
|
+
return iNdEx, nil
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return 0, io.ErrUnexpectedEOF
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
var (
|
|
268
|
+
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
269
|
+
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
|
|
270
|
+
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
|
|
271
|
+
)
|
package/echo/server.go
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
package echo
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
context "context"
|
|
5
|
+
"errors"
|
|
6
|
+
"io"
|
|
7
|
+
"time"
|
|
8
|
+
|
|
9
|
+
"google.golang.org/protobuf/proto"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
// EchoServer implements the server side of Echo.
|
|
13
|
+
type EchoServer struct {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Echo implements echo.SRPCEchoerServer
|
|
17
|
+
func (*EchoServer) Echo(ctx context.Context, msg *EchoMsg) (*EchoMsg, error) {
|
|
18
|
+
return proto.Clone(msg).(*EchoMsg), nil
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// EchoServerStream implements SRPCEchoerServer
|
|
22
|
+
func (*EchoServer) EchoServerStream(msg *EchoMsg, strm SRPCEchoer_EchoServerStreamStream) error {
|
|
23
|
+
// send 5 responses, with a 200ms delay for each
|
|
24
|
+
responses := 5
|
|
25
|
+
tkr := time.NewTicker(time.Millisecond * 200)
|
|
26
|
+
defer tkr.Stop()
|
|
27
|
+
for i := 0; i < responses; i++ {
|
|
28
|
+
if err := strm.MsgSend(msg); err != nil {
|
|
29
|
+
return err
|
|
30
|
+
}
|
|
31
|
+
select {
|
|
32
|
+
case <-strm.Context().Done():
|
|
33
|
+
return context.Canceled
|
|
34
|
+
case <-tkr.C:
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return nil
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// EchoClientStream implements SRPCEchoerServer
|
|
41
|
+
func (*EchoServer) EchoClientStream(strm SRPCEchoer_EchoClientStreamStream) error {
|
|
42
|
+
msg, err := strm.Recv()
|
|
43
|
+
if err != nil {
|
|
44
|
+
return err
|
|
45
|
+
}
|
|
46
|
+
return strm.SendAndClose(msg)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// EchoBidiStream implements SRPCEchoerServer
|
|
50
|
+
func (s *EchoServer) EchoBidiStream(strm SRPCEchoer_EchoBidiStreamStream) error {
|
|
51
|
+
// server sends initial message
|
|
52
|
+
if err := strm.MsgSend(&EchoMsg{Body: "hello from server"}); err != nil {
|
|
53
|
+
return err
|
|
54
|
+
}
|
|
55
|
+
for {
|
|
56
|
+
msg, err := strm.Recv()
|
|
57
|
+
if err != nil {
|
|
58
|
+
if err == io.EOF {
|
|
59
|
+
return nil
|
|
60
|
+
}
|
|
61
|
+
return err
|
|
62
|
+
}
|
|
63
|
+
if len(msg.GetBody()) == 0 {
|
|
64
|
+
return errors.New("got message with empty body")
|
|
65
|
+
}
|
|
66
|
+
if err := strm.Send(msg); err != nil {
|
|
67
|
+
return err
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// _ is a type assertion
|
|
73
|
+
var _ SRPCEchoerServer = ((*EchoServer)(nil))
|
package/go.mod
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module github.com/aperturerobotics/starpc
|
|
2
|
+
|
|
3
|
+
go 1.18
|
|
4
|
+
|
|
5
|
+
require (
|
|
6
|
+
github.com/pkg/errors v0.9.1
|
|
7
|
+
google.golang.org/protobuf v1.26.0
|
|
8
|
+
nhooyr.io/websocket v1.8.7
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
require (
|
|
12
|
+
github.com/libp2p/go-libp2p v0.20.1
|
|
13
|
+
github.com/sirupsen/logrus v1.8.1
|
|
14
|
+
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
require (
|
|
18
|
+
github.com/btcsuite/btcd v0.22.1 // indirect
|
|
19
|
+
github.com/btcsuite/btcd/btcec/v2 v2.1.3 // indirect
|
|
20
|
+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
|
|
21
|
+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
|
|
22
|
+
github.com/gogo/protobuf v1.3.2 // indirect
|
|
23
|
+
github.com/ipfs/go-cid v0.1.0 // indirect
|
|
24
|
+
github.com/ipfs/go-log/v2 v2.5.1 // indirect
|
|
25
|
+
github.com/klauspost/compress v1.15.1 // indirect
|
|
26
|
+
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
|
|
27
|
+
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
|
|
28
|
+
github.com/libp2p/go-libp2p-core v0.16.1 // indirect
|
|
29
|
+
github.com/libp2p/go-mplex v0.7.0 // indirect
|
|
30
|
+
github.com/libp2p/go-openssl v0.0.7 // indirect
|
|
31
|
+
github.com/mattn/go-isatty v0.0.14 // indirect
|
|
32
|
+
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
|
|
33
|
+
github.com/minio/sha256-simd v1.0.0 // indirect
|
|
34
|
+
github.com/mr-tron/base58 v1.2.0 // indirect
|
|
35
|
+
github.com/multiformats/go-base32 v0.0.3 // indirect
|
|
36
|
+
github.com/multiformats/go-base36 v0.1.0 // indirect
|
|
37
|
+
github.com/multiformats/go-multiaddr v0.5.0 // indirect
|
|
38
|
+
github.com/multiformats/go-multibase v0.0.3 // indirect
|
|
39
|
+
github.com/multiformats/go-multicodec v0.4.1 // indirect
|
|
40
|
+
github.com/multiformats/go-multihash v0.1.0 // indirect
|
|
41
|
+
github.com/multiformats/go-varint v0.0.6 // indirect
|
|
42
|
+
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
|
43
|
+
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
|
44
|
+
go.uber.org/atomic v1.7.0 // indirect
|
|
45
|
+
go.uber.org/multierr v1.6.0 // indirect
|
|
46
|
+
go.uber.org/zap v1.19.1 // indirect
|
|
47
|
+
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
|
|
48
|
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
|
|
49
|
+
lukechampine.com/blake3 v1.1.6 // indirect
|
|
50
|
+
)
|
package/go.sum
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
|
2
|
+
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
|
|
3
|
+
github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c=
|
|
4
|
+
github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y=
|
|
5
|
+
github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE=
|
|
6
|
+
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
|
|
7
|
+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
|
|
8
|
+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
|
9
|
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
10
|
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
11
|
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
12
|
+
github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
|
|
13
|
+
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
|
|
14
|
+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
|
|
15
|
+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
|
|
16
|
+
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
|
17
|
+
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
|
18
|
+
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
|
|
19
|
+
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
|
20
|
+
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
|
21
|
+
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
|
22
|
+
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
|
23
|
+
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
|
24
|
+
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
|
25
|
+
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
|
|
26
|
+
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
|
27
|
+
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
|
|
28
|
+
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
|
29
|
+
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
|
30
|
+
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
|
31
|
+
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
|
32
|
+
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
|
33
|
+
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
|
34
|
+
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
35
|
+
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
|
36
|
+
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
|
37
|
+
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
|
38
|
+
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
|
39
|
+
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
40
|
+
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
|
41
|
+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
42
|
+
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
43
|
+
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
|
44
|
+
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
|
45
|
+
github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=
|
|
46
|
+
github.com/ipfs/go-cid v0.1.0 h1:YN33LQulcRHjfom/i25yoOZR4Telp1Hr/2RU3d0PnC0=
|
|
47
|
+
github.com/ipfs/go-cid v0.1.0/go.mod h1:rH5/Xv83Rfy8Rw6xG+id3DYAMUVmem1MowoKwdXmN2o=
|
|
48
|
+
github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY=
|
|
49
|
+
github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
|
|
50
|
+
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
|
51
|
+
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
52
|
+
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
|
53
|
+
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
54
|
+
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
|
55
|
+
github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
|
|
56
|
+
github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
|
57
|
+
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
|
58
|
+
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
|
|
59
|
+
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
|
60
|
+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
|
61
|
+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|
62
|
+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|
63
|
+
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
|
64
|
+
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
|
65
|
+
github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs=
|
|
66
|
+
github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM=
|
|
67
|
+
github.com/libp2p/go-libp2p v0.20.1 h1:tCgC8yXtleyOg/mp+ZoCcA+aryAhueCfFmAVXURT/PM=
|
|
68
|
+
github.com/libp2p/go-libp2p v0.20.1/go.mod h1:XgJHsOhEBVBXp/2Sj9bm/yEyD94uunAaP6oaegdcKks=
|
|
69
|
+
github.com/libp2p/go-libp2p-core v0.16.1 h1:bWoiEBqVkpJ13hbv/f69tHODp86t6mvc4fBN4DkK73M=
|
|
70
|
+
github.com/libp2p/go-libp2p-core v0.16.1/go.mod h1:O3i/7y+LqUb0N+qhzXjBjjpchgptWAVMG1Voegk7b4c=
|
|
71
|
+
github.com/libp2p/go-libp2p-testing v0.9.2 h1:dCpODRtRaDZKF8HXT9qqqgON+OMEB423Knrgeod8j84=
|
|
72
|
+
github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY=
|
|
73
|
+
github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W168L9EU=
|
|
74
|
+
github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw=
|
|
75
|
+
github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
|
|
76
|
+
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
|
77
|
+
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
|
78
|
+
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
|
79
|
+
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g=
|
|
80
|
+
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
|
|
81
|
+
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
|
82
|
+
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
|
83
|
+
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
|
84
|
+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
|
85
|
+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
86
|
+
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
|
|
87
|
+
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
88
|
+
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
|
89
|
+
github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
|
90
|
+
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
|
91
|
+
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
|
92
|
+
github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI=
|
|
93
|
+
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=
|
|
94
|
+
github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
|
|
95
|
+
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
|
|
96
|
+
github.com/multiformats/go-multiaddr v0.5.0 h1:i/JuOoVg4szYQ4YEzDGtb2h0o8M7CG/Yq6cGlcjWZpM=
|
|
97
|
+
github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug=
|
|
98
|
+
github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk=
|
|
99
|
+
github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
|
|
100
|
+
github.com/multiformats/go-multicodec v0.4.1 h1:BSJbf+zpghcZMZrwTYBGwy0CPcVZGWiC72Cp8bBd4R4=
|
|
101
|
+
github.com/multiformats/go-multicodec v0.4.1/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ=
|
|
102
|
+
github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=
|
|
103
|
+
github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=
|
|
104
|
+
github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg=
|
|
105
|
+
github.com/multiformats/go-multihash v0.1.0 h1:CgAgwqk3//SVEw3T+6DqI4mWMyRuDwZtOWcJT0q9+EA=
|
|
106
|
+
github.com/multiformats/go-multihash v0.1.0/go.mod h1:RJlXsxt6vHGaia+S8We0ErjhojtKzPP2AH4+kYM7k84=
|
|
107
|
+
github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
|
108
|
+
github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=
|
|
109
|
+
github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
|
110
|
+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
111
|
+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|
112
|
+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
113
|
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
114
|
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
115
|
+
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
|
116
|
+
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
|
117
|
+
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
|
|
118
|
+
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
|
|
119
|
+
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
|
120
|
+
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
|
121
|
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
122
|
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
123
|
+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
124
|
+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
|
125
|
+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
|
126
|
+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
127
|
+
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
|
128
|
+
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
|
129
|
+
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
|
130
|
+
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
|
131
|
+
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
132
|
+
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
133
|
+
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
|
134
|
+
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
|
135
|
+
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
|
136
|
+
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
|
|
137
|
+
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
|
138
|
+
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
|
139
|
+
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
|
140
|
+
go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
|
|
141
|
+
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
|
142
|
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
143
|
+
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
144
|
+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
145
|
+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
146
|
+
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
|
147
|
+
golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
|
148
|
+
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
|
|
149
|
+
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
|
150
|
+
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
151
|
+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
152
|
+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
153
|
+
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
154
|
+
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
155
|
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
156
|
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
157
|
+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
158
|
+
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
159
|
+
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
160
|
+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
|
161
|
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
162
|
+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
163
|
+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
164
|
+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
165
|
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
166
|
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
167
|
+
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
168
|
+
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
169
|
+
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
170
|
+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
171
|
+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
172
|
+
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
173
|
+
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
174
|
+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
175
|
+
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
176
|
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
|
|
177
|
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
178
|
+
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
|
179
|
+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
180
|
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
181
|
+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|
182
|
+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
183
|
+
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
|
|
184
|
+
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
185
|
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
186
|
+
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
187
|
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
188
|
+
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
|
189
|
+
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
190
|
+
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
191
|
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
192
|
+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
193
|
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
194
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
195
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
196
|
+
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
|
197
|
+
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
|
198
|
+
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
199
|
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
200
|
+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
201
|
+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
202
|
+
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
|
203
|
+
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
204
|
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
205
|
+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
|
206
|
+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
207
|
+
lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c=
|
|
208
|
+
lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
|
|
209
|
+
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
|
210
|
+
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eo pipefail
|
|
3
|
+
|
|
4
|
+
echo "Compiling ts..."
|
|
5
|
+
# ../node_modules/.bin/tsc --out integration.js --project tsconfig.json
|
|
6
|
+
../node_modules/.bin/esbuild integration.ts --bundle --platform=node --outfile=integration.js
|
|
7
|
+
|
|
8
|
+
echo "Compiling go..."
|
|
9
|
+
go build -o integration -v ./
|
|
10
|
+
|
|
11
|
+
echo "Starting server..."
|
|
12
|
+
./integration &
|
|
13
|
+
PID=$!
|
|
14
|
+
|
|
15
|
+
function cleanup {
|
|
16
|
+
kill -9 ${PID}
|
|
17
|
+
}
|
|
18
|
+
trap cleanup EXIT
|
|
19
|
+
|
|
20
|
+
sleep 1
|
|
21
|
+
|
|
22
|
+
pushd ../
|
|
23
|
+
echo "Starting client..."
|
|
24
|
+
node ./integration/integration.js
|
|
25
|
+
popd
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
package main
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"fmt"
|
|
5
|
+
"net/http"
|
|
6
|
+
|
|
7
|
+
"github.com/aperturerobotics/starpc/echo"
|
|
8
|
+
"github.com/aperturerobotics/starpc/srpc"
|
|
9
|
+
"github.com/sirupsen/logrus"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
func main() {
|
|
13
|
+
mux := srpc.NewMux()
|
|
14
|
+
|
|
15
|
+
echoServer := &echo.EchoServer{}
|
|
16
|
+
if err := echo.SRPCRegisterEchoer(mux, echoServer); err != nil {
|
|
17
|
+
logrus.Fatal(err.Error())
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// listen at: ws://localhost:5000/demo
|
|
21
|
+
server, err := srpc.NewHTTPServer(mux, "/demo")
|
|
22
|
+
if err != nil {
|
|
23
|
+
logrus.Fatal(err.Error())
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fmt.Print("listening on :5000\n")
|
|
27
|
+
if err := http.ListenAndServe(":5000", server); err != nil {
|
|
28
|
+
logrus.Fatal(err.Error())
|
|
29
|
+
}
|
|
30
|
+
}
|