2016-10-01 16:34:42 -04:00
|
|
|
package winrm
|
|
|
|
|
2020-06-15 16:18:51 -04:00
|
|
|
import "net"
|
|
|
|
|
2016-10-01 16:34:42 -04:00
|
|
|
// Parameters struct defines
|
|
|
|
// metadata information and http transport config
|
|
|
|
type Parameters struct {
|
|
|
|
Timeout string
|
|
|
|
Locale string
|
|
|
|
EnvelopeSize int
|
2017-01-18 16:03:02 -05:00
|
|
|
TransportDecorator func() Transporter
|
2020-06-15 16:18:51 -04:00
|
|
|
Dial func(network, addr string) (net.Conn, error)
|
2016-10-01 16:34:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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,
|
|
|
|
}
|
|
|
|
}
|