mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-21 07:21:40 -04:00
Updated winrm and winrmcp dependencies. Relevant unit and acceptance tests passed successfully. shell.Execute didn't return a Command object. See https://github.com/packer-community/winrmcp/blob/f1bcf36a69fa2945e65dd099eee11b560fbd3346/winrmcp/cp.go#L167 and https://github.com/masterzen/winrm/blob/54ea5d01478cfc2afccec1504bd0dfcd8c260cfa/winrm/shell.go#L10-L22 respectively. Closes #3763 Original patch by: Philipp Kosel <[email protected]>
29 lines
724 B
Go
29 lines
724 B
Go
package winrm
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Parameters struct defines
|
|
// metadata information and http transport config
|
|
type Parameters struct {
|
|
Timeout string
|
|
Locale string
|
|
EnvelopeSize int
|
|
TransportDecorator func(*http.Transport) http.RoundTripper
|
|
}
|
|
|
|
// DefaultParameters return constant config
|
|
// of type Parameters
|
|
var DefaultParameters = NewParameters("PT60S", "en-US", 153600)
|
|
|
|
// NewParameters return new struct of type Parameters
|
|
// this struct makes the configuration for the request, size message, etc.
|
|
func NewParameters(timeout, locale string, envelopeSize int) *Parameters {
|
|
return &Parameters{
|
|
Timeout: timeout,
|
|
Locale: locale,
|
|
EnvelopeSize: envelopeSize,
|
|
}
|
|
}
|