Dial(shr) -> DialWithOptions(shr, ...) (#772)

This commit is contained in:
Michael Quigley
2024-10-18 11:36:13 -04:00
parent 9b83157a9b
commit 2a1e39e1e6
7 changed files with 8 additions and 7 deletions

View File

@ -5,6 +5,7 @@ import (
"github.com/openziti/sdk-golang/ziti/edge"
"github.com/openziti/zrok/environment/env_core"
"github.com/pkg/errors"
"time"
)
func NewDialer(shrToken string, root env_core.Root) (edge.Conn, error) {
@ -23,7 +24,7 @@ func NewDialer(shrToken string, root env_core.Root) (edge.Conn, error) {
return nil, errors.Wrap(err, "error getting ziti context")
}
conn, err := zctx.Dial(shrToken)
conn, err := zctx.DialWithOptions(shrToken, &ziti.DialOptions{ConnectTimeout: 30 * time.Second})
if err != nil {
return nil, errors.Wrapf(err, "error dialing '%v'", shrToken)
}