mirror of
https://github.com/vale981/agent
synced 2025-03-04 09:01:42 -05:00
broadcast mode is removed as for now
This commit is contained in:
parent
bab9beba49
commit
0b93de7f16
4 changed files with 58 additions and 440 deletions
|
@ -23,12 +23,11 @@ When you first run `indihub-agent` and it is connected to INDIHUB-network succes
|
|||
|
||||
## indihub-agent modes
|
||||
|
||||
There are four modes available at the moment:
|
||||
There are three modes available at the moment:
|
||||
|
||||
1. `share` - open remote access to your equipment via INDIHUB-network of telescopes, so you can provide remote imaging sessions to your guests.
|
||||
2. `solo` - use you equipment without opening remote access but equipment is still connected to INDIHUB-network and all images taken are contributed for scientific purposes.
|
||||
3. `broadcast` - broadcast you imaging session to observers watching it via INDI-clients, in this case without any equipment remote access and sharing (experimental).
|
||||
4. `robotic` - open remote access to your equipment to be controlled by scheduler running in INDIHUB-cloud (experimental).
|
||||
3. `robotic` - open remote access to your equipment to be controlled by scheduler running in INDIHUB-cloud (experimental).
|
||||
|
||||
The mode is specified via `-mode` parameter, i.e. to run indihub-agent in a share-mode you will need run command:
|
||||
|
||||
|
|
|
@ -1,189 +0,0 @@
|
|||
package broadcast
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/fatih/color"
|
||||
|
||||
"github.com/indihub-space/agent/lib"
|
||||
"github.com/indihub-space/agent/proto/indihub"
|
||||
)
|
||||
|
||||
var (
|
||||
getPropertiesStart = []byte("<getProperties")
|
||||
)
|
||||
|
||||
type INDIHubBroadcastTunnel interface {
|
||||
Send(*indihub.Response) error
|
||||
Recv() (*indihub.Request, error)
|
||||
CloseSend() error
|
||||
}
|
||||
|
||||
type BroadcastTcpProxy struct {
|
||||
Name string
|
||||
Addr string
|
||||
listener net.Listener
|
||||
Tunnel INDIHubBroadcastTunnel
|
||||
|
||||
connInMap map[uint32]net.Conn
|
||||
connOutMap map[uint32]net.Conn
|
||||
shouldExit int32
|
||||
}
|
||||
|
||||
func New(name string, addr string, tunnel INDIHubBroadcastTunnel) *BroadcastTcpProxy {
|
||||
return &BroadcastTcpProxy{
|
||||
Name: name,
|
||||
Addr: addr,
|
||||
Tunnel: tunnel,
|
||||
connInMap: map[uint32]net.Conn{},
|
||||
connOutMap: map[uint32]net.Conn{},
|
||||
}
|
||||
}
|
||||
|
||||
func (p *BroadcastTcpProxy) Start(sessionID uint64, sessionToken string, addr string) {
|
||||
log.Printf("Starting INDI-server for INDIHUB in broadcast mode on %s ...", addr)
|
||||
var err error
|
||||
p.listener, err = net.Listen("tcp", addr)
|
||||
if err != nil {
|
||||
log.Printf("Could not start INDI-server for INDIHUB in broadcast mode: %v\n", err)
|
||||
return
|
||||
}
|
||||
log.Println("...OK")
|
||||
|
||||
// receive public address from tunnel
|
||||
in, err := p.Tunnel.Recv()
|
||||
if err == io.EOF {
|
||||
// read done, server closed connection
|
||||
log.Printf("Exiting. Got EOF from %s tunnel.\n", p.Name)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
log.Printf("Exiting. Failed to receive a request from %s tunnel: %v\n", p.Name, err)
|
||||
return
|
||||
}
|
||||
|
||||
c := color.New(color.FgCyan)
|
||||
gc := color.New(color.FgGreen)
|
||||
c.Println()
|
||||
c.Println(" ************************************************************")
|
||||
c.Println(" * INDIHUB broadcast address !! *")
|
||||
c.Println(" ************************************************************")
|
||||
c.Println(" ")
|
||||
gc.Printf(" %s\n", string(in.Data))
|
||||
c.Println(" ")
|
||||
c.Println(" ************************************************************")
|
||||
c.Println()
|
||||
|
||||
var connCnt uint32
|
||||
|
||||
for {
|
||||
if atomic.LoadInt32(&p.shouldExit) == 1 {
|
||||
break
|
||||
}
|
||||
|
||||
// Wait for a connection from INDI-client
|
||||
connIn, err := p.listener.Accept()
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
|
||||
// connection to real INDI-server
|
||||
connOut, err := net.Dial("tcp", p.Addr)
|
||||
if err != nil {
|
||||
log.Printf("%s - could not connect to INDI-server: %v\n", p.Name, err)
|
||||
connIn.Close()
|
||||
continue
|
||||
}
|
||||
|
||||
connCnt += 1
|
||||
p.connInMap[connCnt] = connIn
|
||||
p.connOutMap[connCnt] = connOut
|
||||
|
||||
// copy requests
|
||||
go func(cNum uint32) {
|
||||
buf := make([]byte, lib.INDIServerMaxRecvMsgSize, lib.INDIServerMaxRecvMsgSize)
|
||||
for {
|
||||
// read from client
|
||||
n, err := connIn.Read(buf)
|
||||
if err != nil {
|
||||
log.Printf("%s - could not read from INDI-client: %v\n", p.Name, err)
|
||||
connIn.Close()
|
||||
connOut.Close()
|
||||
break
|
||||
}
|
||||
|
||||
// we want to let server know about getProperties and connection number
|
||||
if bytes.HasPrefix(buf[:n], getPropertiesStart) {
|
||||
// broadcast
|
||||
resp := &indihub.Response{
|
||||
Data: buf[:n],
|
||||
Conn: cNum,
|
||||
SessionID: sessionID,
|
||||
SessionToken: sessionToken,
|
||||
}
|
||||
if err := p.Tunnel.Send(resp); err != nil {
|
||||
log.Printf("Failed broadcast request to %s tunnel: %v", p.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
// send to server
|
||||
if _, err := connOut.Write(buf[:n]); err != nil {
|
||||
log.Printf("%s - could not write to INDI-server: %v\n", p.Name, err)
|
||||
connIn.Close()
|
||||
connOut.Close()
|
||||
break
|
||||
}
|
||||
}
|
||||
delete(p.connInMap, cNum)
|
||||
delete(p.connOutMap, cNum)
|
||||
}(connCnt)
|
||||
|
||||
// copy and broadcast responses
|
||||
go func(cNum uint32, sessID uint64) {
|
||||
buf := make([]byte, lib.INDIServerMaxSendMsgSize, lib.INDIServerMaxSendMsgSize)
|
||||
for {
|
||||
n, err := connOut.Read(buf)
|
||||
if err != nil {
|
||||
log.Printf("%s - could not read from INDI-server: %v\n", p.Name, err)
|
||||
connIn.Close()
|
||||
return
|
||||
}
|
||||
|
||||
// send to client
|
||||
if _, err := connIn.Write(buf[:n]); err != nil {
|
||||
log.Printf("%s - could not write to INDI-client: %v\n", p.Name, err)
|
||||
connOut.Close()
|
||||
return
|
||||
}
|
||||
|
||||
// broadcast
|
||||
resp := &indihub.Response{
|
||||
Data: buf[:n],
|
||||
Conn: cNum,
|
||||
SessionID: sessID,
|
||||
SessionToken: sessionToken,
|
||||
}
|
||||
if err := p.Tunnel.Send(resp); err != nil {
|
||||
log.Printf("Failed broadcast response to %s tunnel: %v", p.Name, err)
|
||||
}
|
||||
}
|
||||
}(connCnt, sessionID)
|
||||
}
|
||||
// close connections to tunnel
|
||||
|
||||
}
|
||||
|
||||
func (p *BroadcastTcpProxy) Close() {
|
||||
atomic.SwapInt32(&p.shouldExit, 1)
|
||||
for _, c := range p.connInMap {
|
||||
c.Close()
|
||||
}
|
||||
p.listener.Close()
|
||||
for _, c := range p.connOutMap {
|
||||
c.Close()
|
||||
}
|
||||
}
|
91
main.go
91
main.go
|
@ -19,7 +19,6 @@ import (
|
|||
"google.golang.org/grpc/credentials"
|
||||
_ "google.golang.org/grpc/encoding/gzip"
|
||||
|
||||
"github.com/indihub-space/agent/broadcast"
|
||||
"github.com/indihub-space/agent/config"
|
||||
"github.com/indihub-space/agent/hostutils"
|
||||
"github.com/indihub-space/agent/lib"
|
||||
|
@ -35,26 +34,24 @@ import (
|
|||
const (
|
||||
defaultWSPort uint64 = 2020
|
||||
|
||||
modeSolo = "solo"
|
||||
modeBroadcast = "broadcast"
|
||||
modeShare = "share"
|
||||
modeRobotic = "robotic"
|
||||
modeSolo = "solo"
|
||||
modeShare = "share"
|
||||
modeRobotic = "robotic"
|
||||
)
|
||||
|
||||
var (
|
||||
flagINDIServerManagerAddr string
|
||||
flagPHD2ServerAddr string
|
||||
flagINDIProfile string
|
||||
flagToken string
|
||||
flagConfFile string
|
||||
flagSoloINDIServerAddr string
|
||||
flagBroadcastINDIServerAddr string
|
||||
flagCompress bool
|
||||
flagWSServer bool
|
||||
flagWSIsTLS bool
|
||||
flagWSPort uint64
|
||||
flagWSOrigins string
|
||||
flagMode string
|
||||
flagINDIServerManagerAddr string
|
||||
flagPHD2ServerAddr string
|
||||
flagINDIProfile string
|
||||
flagToken string
|
||||
flagConfFile string
|
||||
flagSoloINDIServerAddr string
|
||||
flagCompress bool
|
||||
flagWSServer bool
|
||||
flagWSIsTLS bool
|
||||
flagWSPort uint64
|
||||
flagWSOrigins string
|
||||
flagMode string
|
||||
|
||||
indiServerAddr string
|
||||
|
||||
|
@ -74,8 +71,7 @@ func init() {
|
|||
modeSolo,
|
||||
`indihub-agent mode (deafult value is "solo"), there four modes:\n
|
||||
solo - equipment sharing is not possible, you are connected to INDIHUB and contributing images
|
||||
sharing - you are sharing equipment with another INDIHUB user (agent will output connection info)
|
||||
broadcast - equipment sharing is not possible, you are broadcasting your experience to any number of INDIHUB users
|
||||
share - you are sharing equipment with another INDIHUB user (agent will output connection info)
|
||||
robotic - equipment sharing is not possible, your equipment is controlled by INDIHUB AI (you can still watch what it is doing!)
|
||||
`,
|
||||
)
|
||||
|
@ -91,12 +87,6 @@ robotic - equipment sharing is not possible, your equipment is controlled by IND
|
|||
"localhost:7624",
|
||||
"agent INDI-server address (host:port) for solo-mode",
|
||||
)
|
||||
flag.StringVar(
|
||||
&flagBroadcastINDIServerAddr,
|
||||
"broadcast-indi-server",
|
||||
"localhost:7624",
|
||||
"agent INDI-server address (host:port) for broadcast-mode",
|
||||
)
|
||||
flag.StringVar(
|
||||
&flagPHD2ServerAddr,
|
||||
"phd2-server",
|
||||
|
@ -150,7 +140,7 @@ robotic - equipment sharing is not possible, your equipment is controlled by IND
|
|||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if flagMode != modeSolo && flagMode != modeShare && flagMode != modeBroadcast && flagMode != modeRobotic {
|
||||
if flagMode != modeSolo && flagMode != modeShare && flagMode != modeRobotic {
|
||||
log.Fatalf("Unknown mode '%s' provided\n", flagMode)
|
||||
}
|
||||
|
||||
|
@ -252,7 +242,7 @@ func main() {
|
|||
SoloMode: flagMode == modeSolo,
|
||||
IsPHD2: flagPHD2ServerAddr != "",
|
||||
IsRobotic: flagMode == modeRobotic,
|
||||
IsBroadcast: flagMode == modeBroadcast,
|
||||
IsBroadcast: false,
|
||||
AgentVersion: version.AgentVersion,
|
||||
Os: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
|
@ -533,50 +523,5 @@ func main() {
|
|||
}
|
||||
c.Println(" ")
|
||||
c.Println(" ************************************************************")
|
||||
|
||||
case modeBroadcast:
|
||||
// broadcast - broadcasting all replies from INDI-server to INDIHUB, equipment sharing is not available
|
||||
log.Println("Starting INDIHUB agent in broadcast mode!")
|
||||
|
||||
broadcastClient, err := indiHubClient.BroadcastINDIServer(context.Background())
|
||||
if err != nil {
|
||||
log.Fatalf("Could not start agent in broadcast mode: %v", err)
|
||||
}
|
||||
|
||||
broadcastProxy := broadcast.New(
|
||||
"INDI-Server Solo-mode",
|
||||
indiServerAddr,
|
||||
broadcastClient,
|
||||
)
|
||||
|
||||
go func() {
|
||||
sigint := make(chan os.Signal, 1)
|
||||
signal.Notify(sigint, os.Interrupt, os.Kill)
|
||||
|
||||
<-sigint
|
||||
|
||||
// stop WS-server
|
||||
wsServer.Stop()
|
||||
|
||||
log.Println("Closing INDIHUB solo-session")
|
||||
|
||||
// close connections to local INDI-server and to INDI client
|
||||
broadcastProxy.Close()
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
// close grpc client connection
|
||||
conn.Close()
|
||||
}()
|
||||
|
||||
// start broadcast mode INDI-server tcp-proxy
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
broadcastProxy.Start(regInfo.SessionID, regInfo.SessionIDPublic, flagBroadcastINDIServerAddr)
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -534,45 +534,44 @@ func init() {
|
|||
func init() { proto.RegisterFile("indihub.proto", fileDescriptor_84cfc05744c754a5) }
|
||||
|
||||
var fileDescriptor_84cfc05744c754a5 = []byte{
|
||||
// 606 bytes of a gzipped FileDescriptor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 0xc0, 0x65,
|
||||
0x3f, 0x3c, 0x12, 0xad, 0xaf, 0x57, 0xeb, 0x1b, 0xad, 0x6e, 0x65, 0x23, 0xe8, 0x7f, 0xc4, 0x97,
|
||||
0x35, 0xf6, 0x8d, 0x99, 0x2f, 0x6b, 0xe8, 0xda, 0xf1, 0x56, 0x60, 0xd7, 0x90, 0x61, 0x0d, 0xdc,
|
||||
0x56, 0x69, 0x8b, 0x0d, 0x63, 0x86, 0x35, 0x28, 0xe1, 0xbd, 0x55, 0xc6, 0x72, 0x6d, 0xb1, 0x51,
|
||||
0xcc, 0x46, 0x82, 0xa6, 0x24, 0x02, 0x00, 0x9a, 0x45, 0x65, 0x93, 0x33, 0x3c, 0x9f, 0x52, 0xd9,
|
||||
0x6f, 0x8f, 0x10, 0xd0, 0xb1, 0xd2, 0xf2, 0x41, 0x68, 0x08, 0xa9, 0x94, 0x1d, 0xd7, 0x8f, 0x28,
|
||||
0x25, 0x64, 0x0e, 0x01, 0x7f, 0xcb, 0x5b, 0xd9, 0x3c, 0x3a, 0x41, 0x0e, 0xd1, 0x97, 0xe4, 0xac,
|
||||
0xe1, 0xa5, 0x68, 0x50, 0x53, 0xc8, 0x06, 0x40, 0x13, 0x32, 0x7f, 0x10, 0x1a, 0xcc, 0x3a, 0xef,
|
||||
0x3b, 0x08, 0x16, 0xb4, 0x6a, 0x04, 0x2a, 0x09, 0x19, 0xd6, 0x38, 0x98, 0xde, 0x58, 0xd5, 0x26,
|
||||
0xe7, 0x6e, 0x30, 0x88, 0xf6, 0x11, 0xcc, 0xc7, 0x08, 0xb2, 0x3f, 0xfe, 0x10, 0xdb, 0x55, 0x5f,
|
||||
0x5e, 0x29, 0x63, 0xa1, 0xbf, 0xc5, 0x8c, 0x07, 0xb9, 0x03, 0xa0, 0x6f, 0xc9, 0x7c, 0x3b, 0xe4,
|
||||
0x8a, 0x72, 0xa3, 0xe5, 0xa2, 0x98, 0x64, 0xcd, 0x76, 0x87, 0xf4, 0x0d, 0x99,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0x7b, 0xb8, 0x10, 0xc3, 0xa4, 0xdd, 0x7a,
|
||||
0x5c, 0xc4, 0xc5, 0xd4, 0x7b, 0x76, 0x42, 0xdf, 0x0d, 0xdb, 0xbe, 0x11, 0x1a, 0xb6, 0x3d, 0x2c,
|
||||
0x76, 0x2f, 0xff, 0x22, 0x28, 0xdc, 0xf7, 0x24, 0x3b, 0xc9, 0xbd, 0x4b, 0x0f, 0x2e, 0xc2, 0x1c,
|
||||
0x8f, 0xb9, 0x18, 0x6c, 0x76, 0xcb, 0x30, 0xb9, 0xb6, 0x28, 0x26, 0x1e, 0xe1, 0x2a, 0xbd, 0x24,
|
||||
0x2f, 0xf6, 0x63, 0x39, 0x4e, 0xc3, 0xf4, 0x17, 0x47, 0x89, 0x29, 0xcf, 0xf1, 0xeb, 0xf8, 0xe1,
|
||||
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xfb, 0x67, 0x14, 0x2e, 0x05, 0x00, 0x00,
|
||||
// 592 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x6b, 0xdb, 0x4c,
|
||||
0x10, 0x8d, 0x14, 0x27, 0x96, 0xd6, 0xf6, 0xf7, 0xc1, 0x52, 0x8a, 0x08, 0x3d, 0x18, 0x41, 0x5b,
|
||||
0x5d, 0x2a, 0x8a, 0xfb, 0x03, 0x0a, 0xc5, 0x87, 0xf8, 0xd0, 0x10, 0xd6, 0xa5, 0xf7, 0x95, 0xb4,
|
||||
0x49, 0x96, 0x4a, 0x1a, 0x77, 0x77, 0x15, 0xc8, 0x0f, 0xe8, 0xbd, 0x3f, 0xa4, 0xf4, 0xd2, 0x3f,
|
||||
0x58, 0x66, 0xb4, 0xb6, 0xe4, 0x84, 0x42, 0x6e, 0xf3, 0xde, 0x2e, 0x9a, 0x79, 0x6f, 0xde, 0x8a,
|
||||
0x2d, 0x74, 0x5b,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,
|
||||
0xfb, 0xc9, 0x80, 0xac, 0x4a, 0x69, 0x5d, 0xc2, 0xa8, 0xcf, 0x98, 0x4a, 0x7f, 0x06, 0x6c, 0x2e,
|
||||
0xd4, 0xad, 0xb6, 0x4e, 0x99, 0x4d, 0x7b, 0x03, 0xff, 0x70, 0xec, 0x28, 0xd0, 0xe1, 0xe3, 0x40,
|
||||
0x67, 0xec, 0xff, 0x03, 0xb8, 0xee, 0x8a, 0x5a, 0x97, 0x7e, 0xdf, 0x8f, 0xe9, 0x27, 0xc2, 0x26,
|
||||
0x4f, 0x85, 0xa5, 0x1f, 0xd9, 0x6c, 0x0b, 0x35, 0x6c, 0xbb, 0xa6, 0xc1, 0x68, 0xa1, 0x53, 0x8d,
|
||||
0xbc, 0x55, 0xf6, 0xaa, 0x6b, 0x68, 0xa8, 0x89, 0x18, 0x88, 0xc3, 0x8b, 0x0c, 0x87, 0x17, 0xb9,
|
||||
0xfa, 0x13, 0xb0, 0xa9, 0x0f, 0x01, 0x7f, 0x37, 0xc8, 0xa3, 0x40, 0xf4, 0x9b, 0xf6, 0xf1, 0xb8,
|
||||
0x58, 0xe4, 0x63, 0xed, 0xe9, 0x09, 0x7f, 0xdb, 0xa7, 0x7d, 0xab, 0x0c, 0xa6, 0x3d, 0xce, 0xf7,
|
||||
0x2f, 0xff, 0x22, 0xca, 0xfd, 0xff, 0x24, 0x3d, 0xc9, 0x82, 0xf7, 0x01, 0x5e, 0xc4, 0x3d, 0x3e,
|
||||
0xe7, 0x62, 0xb4, 0xdd, 0x87, 0x61, 0x74, 0x6d, 0x9e, 0x8f, 0x34, 0xe2, 0xd5, 0xe2, 0x9c, 0xfe,
|
||||
0x5c, 0x1f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x92, 0x4a, 0x3d, 0x07, 0xca, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -591,8 +590,6 @@ type INDIHubClient interface {
|
|||
INDIServer(ctx context.Context, opts ...grpc.CallOption) (INDIHub_INDIServerClient, error)
|
||||
PHD2Server(ctx context.Context, opts ...grpc.CallOption) (INDIHub_PHD2ServerClient, error)
|
||||
SoloMode(ctx context.Context, opts ...grpc.CallOption) (INDIHub_SoloModeClient, error)
|
||||
BroadcastINDIServer(ctx context.Context, opts ...grpc.CallOption) (INDIHub_BroadcastINDIServerClient, error)
|
||||
BroadcastPHD2Server(ctx context.Context, opts ...grpc.CallOption) (INDIHub_BroadcastPHD2ServerClient, error)
|
||||
}
|
||||
|
||||
type iNDIHubClient struct {
|
||||
|
@ -708,76 +705,12 @@ func (x *iNDIHubSoloModeClient) CloseAndRecv() (*SoloSummary, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func (c *iNDIHubClient) BroadcastINDIServer(ctx context.Context, opts ...grpc.CallOption) (INDIHub_BroadcastINDIServerClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_INDIHub_serviceDesc.Streams[3], "/INDIHub/BroadcastINDIServer", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &iNDIHubBroadcastINDIServerClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type INDIHub_BroadcastINDIServerClient interface {
|
||||
Send(*Response) error
|
||||
Recv() (*Request, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type iNDIHubBroadcastINDIServerClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastINDIServerClient) Send(m *Response) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastINDIServerClient) Recv() (*Request, error) {
|
||||
m := new(Request)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *iNDIHubClient) BroadcastPHD2Server(ctx context.Context, opts ...grpc.CallOption) (INDIHub_BroadcastPHD2ServerClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_INDIHub_serviceDesc.Streams[4], "/INDIHub/BroadcastPHD2Server", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &iNDIHubBroadcastPHD2ServerClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type INDIHub_BroadcastPHD2ServerClient interface {
|
||||
Send(*Response) error
|
||||
Recv() (*Request, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type iNDIHubBroadcastPHD2ServerClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastPHD2ServerClient) Send(m *Response) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastPHD2ServerClient) Recv() (*Request, error) {
|
||||
m := new(Request)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// INDIHubServer is the server API for INDIHub service.
|
||||
type INDIHubServer interface {
|
||||
RegisterHost(context.Context, *INDIHubHost) (*RegisterInfo, error)
|
||||
INDIServer(INDIHub_INDIServerServer) error
|
||||
PHD2Server(INDIHub_PHD2ServerServer) error
|
||||
SoloMode(INDIHub_SoloModeServer) error
|
||||
BroadcastINDIServer(INDIHub_BroadcastINDIServerServer) error
|
||||
BroadcastPHD2Server(INDIHub_BroadcastPHD2ServerServer) error
|
||||
}
|
||||
|
||||
// UnimplementedINDIHubServer can be embedded to have forward compatible implementations.
|
||||
|
@ -796,12 +729,6 @@ func (*UnimplementedINDIHubServer) PHD2Server(srv INDIHub_PHD2ServerServer) erro
|
|||
func (*UnimplementedINDIHubServer) SoloMode(srv INDIHub_SoloModeServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SoloMode not implemented")
|
||||
}
|
||||
func (*UnimplementedINDIHubServer) BroadcastINDIServer(srv INDIHub_BroadcastINDIServerServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method BroadcastINDIServer not implemented")
|
||||
}
|
||||
func (*UnimplementedINDIHubServer) BroadcastPHD2Server(srv INDIHub_BroadcastPHD2ServerServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method BroadcastPHD2Server not implemented")
|
||||
}
|
||||
|
||||
func RegisterINDIHubServer(s *grpc.Server, srv INDIHubServer) {
|
||||
s.RegisterService(&_INDIHub_serviceDesc, srv)
|
||||
|
@ -903,58 +830,6 @@ func (x *iNDIHubSoloModeServer) Recv() (*Response, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func _INDIHub_BroadcastINDIServer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(INDIHubServer).BroadcastINDIServer(&iNDIHubBroadcastINDIServerServer{stream})
|
||||
}
|
||||
|
||||
type INDIHub_BroadcastINDIServerServer interface {
|
||||
Send(*Request) error
|
||||
Recv() (*Response, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type iNDIHubBroadcastINDIServerServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastINDIServerServer) Send(m *Request) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastINDIServerServer) Recv() (*Response, error) {
|
||||
m := new(Response)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _INDIHub_BroadcastPHD2Server_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(INDIHubServer).BroadcastPHD2Server(&iNDIHubBroadcastPHD2ServerServer{stream})
|
||||
}
|
||||
|
||||
type INDIHub_BroadcastPHD2ServerServer interface {
|
||||
Send(*Request) error
|
||||
Recv() (*Response, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type iNDIHubBroadcastPHD2ServerServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastPHD2ServerServer) Send(m *Request) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *iNDIHubBroadcastPHD2ServerServer) Recv() (*Response, error) {
|
||||
m := new(Response)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _INDIHub_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "INDIHub",
|
||||
HandlerType: (*INDIHubServer)(nil),
|
||||
|
@ -982,18 +857,6 @@ var _INDIHub_serviceDesc = grpc.ServiceDesc{
|
|||
Handler: _INDIHub_SoloMode_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "BroadcastINDIServer",
|
||||
Handler: _INDIHub_BroadcastINDIServer_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "BroadcastPHD2Server",
|
||||
Handler: _INDIHub_BroadcastPHD2Server_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "indihub.proto",
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue