netext

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2019 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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"
	SSL_3_0                            = "ssl3.0"
	TLS_1_0                            = "tls1.0"
	TLS_1_1                            = "tls1.1"
	TLS_1_2                            = "tls1.2"
)

Variables

This section is empty.

Functions

func ParseTLSConnState added in v0.23.0

func ParseTLSConnState(tlsState *tls.ConnectionState) (TLSInfo, OCSP)

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 Conn

type Conn struct {
	net.Conn

	BytesRead, BytesWritten *int64
}

Conn wraps net.Conn and keeps track of sent and received data size

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

type Dialer

type Dialer struct {
	net.Dialer

	Resolver  *dnscache.Resolver
	Blacklist []*net.IPNet
	Hosts     map[string]net.IP

	BytesRead    int64
	BytesWritten int64
}

Dialer wraps net.Dialer and provides k6 specific functionality - tracing, blacklists and DNS cache and aliases.

func NewDialer

func NewDialer(dialer net.Dialer) *Dialer

NewDialer constructs a new Dialer and initializes its cache.

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, proto, addr string) (net.Conn, error)

DialContext wraps the net.Dialer.DialContext and handles the k6 specifics

func (*Dialer) GetTrail added in v0.21.0

func (d *Dialer) GetTrail(startTime, endTime time.Time, fullIteration bool, tags *stats.SampleTags) *NetTrail

GetTrail creates a new NetTrail instance with the Dialer sent and received data metrics and the supplied times and tags.

type NetTrail added in v0.21.0

type NetTrail struct {
	BytesRead     int64
	BytesWritten  int64
	FullIteration bool
	StartTime     time.Time
	EndTime       time.Time
	Tags          *stats.SampleTags
	Samples       []stats.Sample
}

NetTrail contains information about the exchanged data size and length of a series of connections from a particular netext.Dialer

func (*NetTrail) GetSamples added in v0.21.0

func (ntr *NetTrail) GetSamples() []stats.Sample

GetSamples implements the stats.SampleContainer interface.

func (*NetTrail) GetTags added in v0.21.0

func (ntr *NetTrail) GetTags() *stats.SampleTags

GetTags implements the stats.ConnectedSampleContainer interface.

func (*NetTrail) GetTime added in v0.21.0

func (ntr *NetTrail) GetTime() time.Time

GetTime implements the stats.ConnectedSampleContainer interface.

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"`
}

type TLSInfo added in v0.23.0

type TLSInfo struct {
	Version     string
	CipherSuite string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL