Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDialerTimeout limits the time spent establishing a TCP connection DefaultDialerTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func NewCredentials ¶
func NewCredentials(p *conf.Poller, logger *slog.Logger) *Credentials
func (*Credentials) Expire ¶
func (c *Credentials) Expire()
Expire will reset the credential schedule if the receiver has a CredentialsScript Otherwise it will do nothing. Resetting the schedule will cause the next call to Password to fetch the credentials
func (*Credentials) GetPollerAuth ¶
func (c *Credentials) GetPollerAuth() (PollerAuth, error)
func (*Credentials) Transport ¶
func (c *Credentials) Transport(request *http.Request, poller *conf.Poller) (http.RoundTripper, error)
type PollerAuth ¶
type PollerAuth struct { Username string Password string AuthToken string IsCert bool HasCredentialScript bool HasCertificateScript bool Schedule string PemCert []byte PemKey []byte CertPath string KeyPath string CaCertPath string // contains filtered or unexported fields }
func (PollerAuth) Certificate ¶
func (a PollerAuth) Certificate() (tls.Certificate, error)
type RoundTripFunc ¶
type ScriptResponse ¶
Click to show internal directories.
Click to hide internal directories.