You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
560 B
31 lines
560 B
package main |
|
|
|
import ( |
|
"context" |
|
"fmt" |
|
|
|
"go-common/app/service/video/stream-mng/api/v1" |
|
"go-common/library/ecode" |
|
"go-common/library/net/rpc/warden" |
|
) |
|
|
|
func main() { |
|
|
|
cc, err := warden.NewClient(nil).Dial(context.Background(), "127.0.0.1:9000") |
|
|
|
if err != nil { |
|
return |
|
} |
|
|
|
client := v1.NewStreamClient(cc) |
|
|
|
resp, err := client.GetRoomIDByStreamName(context.Background(), &v1.GetRoomIDByStreamNameReq{ |
|
StreamName: "", |
|
}) |
|
|
|
fmt.Printf("%v=%v", resp, err) |
|
|
|
e := ecode.Cause(err) |
|
|
|
fmt.Printf("%v=%v=%v=%v", e, e.Code(), e.Message(), e.Details()) |
|
}
|
|
|