Upgrade invoker.

This commit is contained in:
Luke Curley 2022-12-05 14:07:58 -08:00
parent 894f26c5af
commit f1311a3d26
3 changed files with 5 additions and 29 deletions

View File

@ -4,7 +4,7 @@ go 1.18
require ( require (
github.com/abema/go-mp4 v0.7.2 github.com/abema/go-mp4 v0.7.2
github.com/kixelated/invoker v0.10.0 github.com/kixelated/invoker v1.0.0
github.com/lucas-clemente/quic-go v0.30.0 github.com/lucas-clemente/quic-go v0.30.0
github.com/marten-seemann/webtransport-go v0.2.0 github.com/marten-seemann/webtransport-go v0.2.0
github.com/zencoder/go-dash/v3 v3.0.2 github.com/zencoder/go-dash/v3 v3.0.2

View File

@ -66,10 +66,8 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/kisielk/errcheck v1.4.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.4.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kixelated/invoker v0.9.2 h1:Pz8JDiRs8EzGc4EGVMZ4RYvFh+iQLXGZ4PG2KZyAh/0= github.com/kixelated/invoker v1.0.0 h1:0wYlvK39yQPbkwIFy+YN41AhF89WOtGyWqV2pZB39xw=
github.com/kixelated/invoker v0.9.2/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8= github.com/kixelated/invoker v1.0.0/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8=
github.com/kixelated/invoker v0.10.0 h1:M93MfnlR5OjKoQNcM2mvEVwKeA3wolxEeqShCkLbcUE=
github.com/kixelated/invoker v0.10.0/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=

View File

@ -1,43 +1,21 @@
package main package main
import ( import (
"bufio"
"context" "context"
"crypto/tls" "crypto/tls"
"errors"
"flag" "flag"
"fmt" "fmt"
"log" "log"
"os"
"strings"
"github.com/kixelated/invoker" "github.com/kixelated/invoker"
"github.com/kixelated/warp-demo/server/internal/warp" "github.com/kixelated/warp-demo/server/internal/warp"
) )
func main() { func main() {
invoker.Panic = true
err := run(context.Background()) err := run(context.Background())
if err == nil { if err != nil {
return log.Fatal(err)
} }
log.Println(err)
var errPanic invoker.ErrPanic
// TODO use an interface
if errors.As(err, &errPanic) {
stack := string(errPanic.Stack())
scanner := bufio.NewScanner(strings.NewReader(stack))
for scanner.Scan() {
log.Println(scanner.Text())
}
}
os.Exit(1)
} }
func run(ctx context.Context) (err error) { func run(ctx context.Context) (err error) {