- Add edge server registry and connection management - Implement edge wire protocol with gRPC streaming - Update proto definitions for control plane communication - Add edge bootstrap runtime and connector - Add code review and plan documentation for G08
31 lines
1,023 B
Go
31 lines
1,023 B
Go
package wire
|
|
|
|
import (
|
|
"google.golang.org/protobuf/proto"
|
|
|
|
proto_socket "git.toki-labs.com/toki/proto-socket/go"
|
|
iop "iop/proto/gen/iop"
|
|
)
|
|
|
|
// EdgeParserMap returns the proto-socket parser set for the Control Plane-Edge
|
|
// native TCP wire contract.
|
|
func EdgeParserMap() proto_socket.ParserMap {
|
|
return proto_socket.ParserMap{
|
|
proto_socket.TypeNameOf(&iop.EdgeHelloRequest{}): func(b []byte) (proto.Message, error) {
|
|
req := &iop.EdgeHelloRequest{}
|
|
return req, proto.Unmarshal(b, req)
|
|
},
|
|
proto_socket.TypeNameOf(&iop.EdgeHelloResponse{}): func(b []byte) (proto.Message, error) {
|
|
res := &iop.EdgeHelloResponse{}
|
|
return res, proto.Unmarshal(b, res)
|
|
},
|
|
proto_socket.TypeNameOf(&iop.EdgeStatusRequest{}): func(b []byte) (proto.Message, error) {
|
|
req := &iop.EdgeStatusRequest{}
|
|
return req, proto.Unmarshal(b, req)
|
|
},
|
|
proto_socket.TypeNameOf(&iop.EdgeStatusResponse{}): func(b []byte) (proto.Message, error) {
|
|
res := &iop.EdgeStatusResponse{}
|
|
return res, proto.Unmarshal(b, res)
|
|
},
|
|
}
|
|
}
|