Documentation ¶
Overview ¶
Package netext provides extensions to the standard net package
Index ¶
Constants ¶
const ( OCSP_STATUS_GOOD = "good" OCSP_STATUS_REVOKED = "revoked" OCSP_STATUS_SERVER_FAILED = "server_failed" OCSP_STATUS_UNKNOWN = "unknown" OCSP_REASON_UNSPECIFIED = "unspecified" OCSP_REASON_KEY_COMPROMISE = "key_compromise" OCSP_REASON_CA_COMPROMISE = "ca_compromise" OCSP_REASON_AFFILIATION_CHANGED = "affiliation_changed" OCSP_REASON_SUPERSEDED = "superseded" OCSP_REASON_CESSATION_OF_OPERATION = "cessation_of_operation" OCSP_REASON_CERTIFICATE_HOLD = "certificate_hold" OCSP_REASON_REMOVE_FROM_CRL = "remove_from_crl" OCSP_REASON_PRIVILEGE_WITHDRAWN = "privilege_withdrawn" OCSP_REASON_AA_COMPROMISE = "aa_compromise" TLS_1_0 = "tls1.0" TLS_1_1 = "tls1.1" TLS_1_2 = "tls1.2" TLS_1_3 = "tls1.3" )
Variables ¶
This section is empty.
Functions ¶
func ParseTLSConnState ¶ added in v0.23.0
func ParseTLSConnState(tlsState *tls.ConnectionState) (TLSInfo, OCSP)
ParseTLSConnState parses tls.ConnectionState and returns TLS and OCSP details
Types ¶
type BlackListedIPError ¶ added in v0.24.0
type BlackListedIPError struct {
// contains filtered or unexported fields
}
BlackListedIPError is an error that is returned when a given IP is blacklisted
func (BlackListedIPError) Error ¶ added in v0.24.0
func (b BlackListedIPError) Error() string
type BlockedHostError ¶ added in v0.32.0
type BlockedHostError struct {
// contains filtered or unexported fields
}
BlockedHostError is returned when a given hostname is blocked
func (BlockedHostError) Error ¶ added in v0.32.0
func (b BlockedHostError) Error() string
type Dialer ¶
type Dialer struct { net.Dialer Resolver Resolver Blacklist []*lib.IPNet BlockedHostnames *types.HostnameTrie Hosts *types.Hosts BytesRead int64 BytesWritten int64 }
Dialer wraps net.Dialer and provides k6 specific functionality - tracing, blacklists and DNS cache and aliases.
func (*Dialer) DialContext ¶
DialContext wraps the net.Dialer.DialContext and handles the k6 specifics
func (*Dialer) IOSamples ¶ added in v0.54.0
func (d *Dialer) IOSamples( sampleTime time.Time, ctm metrics.TagsAndMeta, builtinMetrics *metrics.BuiltinMetrics, ) metrics.SampleContainer
IOSamples returns samples for data send and received since it last call and zeros out. It uses the provided time as the sample time and tags and builtinMetrics to build the samples.
type MultiResolver ¶ added in v0.32.0
MultiResolver returns all IP addresses for the given host.
type OCSP ¶ added in v0.23.0
type OCSP struct { ProducedAt int64 `json:"produced_at"` ThisUpdate int64 `json:"this_update"` NextUpdate int64 `json:"next_update"` RevokedAt int64 `json:"revoked_at"` RevocationReason string `json:"revocation_reason"` Status string `json:"status"` }
OCSP keeps Online Certificate Status Protocol (OCSP) details
type Resolver ¶ added in v0.32.0
Resolver is an interface that returns DNS information about a given host.
func NewResolver ¶ added in v0.32.0
func NewResolver( actRes MultiResolver, ttl time.Duration, sel types.DNSSelect, pol types.DNSPolicy, ) Resolver
NewResolver returns a new DNS resolver. If ttl is not 0, responses will be cached per host for the specified period. The IP returned from LookupIP() will be selected based on the given sel and pol values.
Directories ¶
Path | Synopsis |
---|---|
Package grpcext allows gRPC requests collecting stats info.
|
Package grpcext allows gRPC requests collecting stats info. |
Package httpext provides extensions to the standard net/http package
|
Package httpext provides extensions to the standard net/http package |