Start of RPC implementation, need to figure out format
This commit is contained in:
parent
8eba57a9ed
commit
a8b1b87f7b
1 changed files with 15 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
func main() {
|
||||
liveShare, err := liveshare.New(
|
||||
liveshare.WithWorkspaceID("..."),
|
||||
liveshare.WithToken("..."),
|
||||
liveshare.WithWorkspaceID(""),
|
||||
liveshare.WithToken(""),
|
||||
)
|
||||
if err != nil {
|
||||
log.Fatal(fmt.Errorf("error creating liveshare: %v", err))
|
||||
|
|
@ -20,4 +20,17 @@ func main() {
|
|||
if err := liveShare.Connect(context.Background()); err != nil {
|
||||
log.Fatal(fmt.Errorf("error connecting to liveshare: %v", err))
|
||||
}
|
||||
|
||||
terminal := liveShare.NewTerminal()
|
||||
|
||||
cmd := terminal.NewCommand(
|
||||
"/home/codespace/workspace",
|
||||
"docker ps -aq --filter label=Type=codespaces --filter status=running",
|
||||
)
|
||||
output, err := cmd.Run(context.Background())
|
||||
if err != nil {
|
||||
log.Fatal(fmt.Errorf("error starting ssh server with liveshare: %v", err))
|
||||
}
|
||||
|
||||
fmt.Println(string(output))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue