switched to Twirp for RPC, server skaffold

This commit is contained in:
David Zhao
2020-10-06 23:20:44 -07:00
parent 5117b8bf80
commit 0d6c0adbdd
20 changed files with 2877 additions and 708 deletions
+13 -6
View File
@@ -2,6 +2,7 @@ package node
import (
"github.com/google/uuid"
"github.com/google/wire"
"github.com/pion/stun"
"github.com/livekit/livekit-server/proto"
@@ -11,16 +12,18 @@ const (
googleStunServer = "stun.l.google.com:19302"
)
var NodeSet = wire.NewSet(NewLocalNode)
type Node struct {
proto.Node
}
type NodeStats struct {
NumRooms int32
NumClients int32
NumRooms int32
NumClients int32
NumVideoChannels int32
NumAudioChannels int32
BytesPerMin int64
BytesPerMin int64
}
func NewLocalNode() (*Node, error) {
@@ -28,11 +31,15 @@ func NewLocalNode() (*Node, error) {
if err != nil {
return nil, err
}
return &Node{
n := &Node{
proto.Node{
Id: id.String(),
},
}, nil
}
if err = n.DiscoverNetworkInfo(); err != nil {
return nil, err
}
return n, nil
}
func (n *Node) DiscoverNetworkInfo() error {
@@ -65,4 +72,4 @@ func (n *Node) DiscoverNetworkInfo() error {
err = stunErr
}
return err
}
}