Commit ab364187 authored by Chris Bednarski's avatar Chris Bednarski
Browse files

Udpated winrmcp dep

parent 29700382
Showing with 6 additions and 0 deletions
+6 -0
......@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"time"
......@@ -24,6 +25,7 @@ type Config struct {
CACertBytes []byte
OperationTimeout time.Duration
MaxOperationsPerShell int
TransportDecorator func(*http.Transport) http.RoundTripper
}
type Auth struct {
......@@ -41,6 +43,10 @@ func New(addr string, config *Config) (*Winrmcp, error) {
}
params := winrm.DefaultParameters()
if config.TransportDecorator != nil {
params.TransportDecorator = config.TransportDecorator
}
if config.OperationTimeout.Seconds() > 0 {
params.Timeout = iso8601.FormatDuration(config.OperationTimeout)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment