Versions in this module Expand all Collapse all v0 v0.28.0 Mar 26, 2024 v0.27.0 Dec 13, 2023 Changes in this version + var ErrDNSLookupParallel = errors.New("dslx: DNSLookupParallel failed") + var ErrSkip = errors.New("dslx: error already processed by a previous stage") + func ApplyAsync[A, B any](ctx context.Context, fx Func[A, B], input A) <-chan *Maybe[B] + func Collect[T any](c <-chan T) (v []T) + func Map[A, B any](ctx context.Context, parallelism Parallelism, fx Func[A, B], inputs <-chan A) <-chan *Maybe[B] + func Matrix[A, B any](ctx context.Context, N Parallelism, inputs []A, functions []Func[A, B]) <-chan *Maybe[B] + func ParallelAsync[A, B any](ctx context.Context, parallelism Parallelism, input A, funcs <-chan Func[A, B]) <-chan *Maybe[B] + func StreamList[T any](ts ...T) <-chan T + func ZipAndCollect[T any](sources ...<-chan T) []T + func Zip[T any](sources ...<-chan T) <-chan T + type AddressSet struct + M map[string]bool + func NewAddressSet(dns ...*Maybe[*ResolvedAddresses]) *AddressSet + func (as *AddressSet) Add(addrs ...string) *AddressSet + func (as *AddressSet) RemoveBogons() *AddressSet + func (as *AddressSet) ToEndpoints(network EndpointNetwork, port EndpointPort, options ...EndpointOption) (v []*Endpoint) + func (as *AddressSet) Uniq() (uniq []string) + type DNSLookupOption func(*DomainToResolve) + func DNSLookupOptionTags(value ...string) DNSLookupOption + type DomainName string + type DomainToResolve struct + Domain string + Tags []string + func NewDomainToResolve(domain DomainName, options ...DNSLookupOption) *DomainToResolve + type Endpoint struct + Address string + Domain string + Network string + Tags []string + func NewEndpoint(network EndpointNetwork, address EndpointAddress, options ...EndpointOption) *Endpoint + type EndpointAddress string + type EndpointNetwork string + type EndpointOption func(*Endpoint) + func EndpointOptionDomain(value string) EndpointOption + func EndpointOptionTags(value ...string) EndpointOption + type EndpointPort uint16 + type Func interface + Apply func(ctx context.Context, a *Maybe[A]) *Maybe[B] + func Compose10[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any, ...](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T10] + func Compose11[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any, ...](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T11] + func Compose12[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any, ...](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T12] + func Compose13[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any, ...](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T13] + func Compose14[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any, ...](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T14] + func Compose2[A, B, C any](f Func[A, B], g Func[B, C]) Func[A, C] + func Compose3[T0 any, T1 any, T2 any, T3 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3]) Func[T0, T3] + func Compose4[T0 any, T1 any, T2 any, T3 any, T4 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4]) Func[T0, T4] + func Compose5[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T5] + func Compose6[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T6] + func Compose7[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T7] + func Compose8[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T8] + func Compose9[T0 any, T1 any, T2 any, T3 any, T4 any, T5 any, T6 any, T7 any, T8 any, T9 any](f0 Func[T0, T1], f1 Func[T1, T2], f2 Func[T2, T3], f3 Func[T3, T4], ...) Func[T0, T9] + func DNSLookupGetaddrinfo(rt Runtime) Func[*DomainToResolve, *ResolvedAddresses] + func DNSLookupParallel(fxs ...Func[*DomainToResolve, *ResolvedAddresses]) Func[*DomainToResolve, *ResolvedAddresses] + func DNSLookupUDP(rt Runtime, endpoint string) Func[*DomainToResolve, *ResolvedAddresses] + func Discard[T any]() Func[T, Void] + func HTTPConnectionQUIC(rt Runtime) Func[*QUICConnection, *HTTPConnection] + func HTTPConnectionTCP(rt Runtime) Func[*TCPConnection, *HTTPConnection] + func HTTPConnectionTLS(rt Runtime) Func[*TLSConnection, *HTTPConnection] + func HTTPRequest(rt Runtime, options ...HTTPRequestOption) Func[*HTTPConnection, *HTTPResponse] + func HTTPRequestOverQUIC(rt Runtime, options ...HTTPRequestOption) Func[*QUICConnection, *HTTPResponse] + func HTTPRequestOverTCP(rt Runtime, options ...HTTPRequestOption) Func[*TCPConnection, *HTTPResponse] + func HTTPRequestOverTLS(rt Runtime, options ...HTTPRequestOption) Func[*TLSConnection, *HTTPResponse] + func MakeEndpoint(network EndpointNetwork, port EndpointPort, options ...EndpointOption) Func[*ResolvedAddress, *Endpoint] + func MeasureResolvedAddresses(fxs ...Func[*ResolvedAddress, Void]) Func[*ResolvedAddresses, Void] + func QUICHandshake(rt Runtime, options ...TLSHandshakeOption) Func[*Endpoint, *QUICConnection] + func TCPConnect(rt Runtime) Func[*Endpoint, *TCPConnection] + func TLSHandshake(rt Runtime, options ...TLSHandshakeOption) Func[*TCPConnection, *TLSConnection] + type FuncAdapter func(ctx context.Context, a *Maybe[A]) *Maybe[B] + func (fa FuncAdapter[A, B]) Apply(ctx context.Context, a *Maybe[A]) *Maybe[B] + type HTTPConnection struct + Address string + Domain string + Network string + Scheme string + TLSNegotiatedProtocol string + Trace Trace + Transport model.HTTPTransport + type HTTPRequestOption func(req *http.Request) + func HTTPRequestOptionAccept(value string) HTTPRequestOption + func HTTPRequestOptionAcceptLanguage(value string) HTTPRequestOption + func HTTPRequestOptionHost(value string) HTTPRequestOption + func HTTPRequestOptionMethod(value string) HTTPRequestOption + func HTTPRequestOptionReferer(value string) HTTPRequestOption + func HTTPRequestOptionURLPath(value string) HTTPRequestOption + func HTTPRequestOptionUserAgent(value string) HTTPRequestOption + type HTTPResponse struct + Address string + Domain string + HTTPRequest *http.Request + HTTPResponse *http.Response + HTTPResponseBodySnapshot []byte + Network string + Trace Trace + type Maybe struct + Error error + State State + func NewMaybeWithError[State any](err error) *Maybe[State] + func NewMaybeWithValue[State any](value State) *Maybe[State] + func Parallel[A, B any](ctx context.Context, parallelism Parallelism, input A, fn ...Func[A, B]) []*Maybe[B] + type MinimalRuntime struct + func NewMinimalRuntime(logger model.Logger, zeroTime time.Time, options ...MinimalRuntimeOption) *MinimalRuntime + func (p *MinimalRuntime) Close() error + func (p *MinimalRuntime) IDGenerator() *atomic.Int64 + func (p *MinimalRuntime) Logger() model.Logger + func (p *MinimalRuntime) MaybeTrackConn(conn io.Closer) + func (p *MinimalRuntime) NewTrace(index int64, zeroTime time.Time, tags ...string) Trace + func (p *MinimalRuntime) Observations() *Observations + func (p *MinimalRuntime) SaveObservations(obs ...*Observations) + func (p *MinimalRuntime) ZeroTime() time.Time + type MinimalRuntimeOption func(rt *MinimalRuntime) + func MinimalRuntimeOptionMeasuringNetwork(netx model.MeasuringNetwork) MinimalRuntimeOption + type Observations struct + NetworkEvents []*model.ArchivalNetworkEvent + QUICHandshakes []*model.ArchivalTLSOrQUICHandshakeResult + Queries []*model.ArchivalDNSLookupResult + Requests []*model.ArchivalHTTPRequestResult + TCPConnect []*model.ArchivalTCPConnectResult + TLSHandshakes []*model.ArchivalTLSOrQUICHandshakeResult + func NewObservations() *Observations + type Operation func(ctx context.Context, a A) (B, error) + func (op Operation[A, B]) Apply(ctx context.Context, a *Maybe[A]) *Maybe[B] + type Parallelism int + type QUICConnection struct + Address string + Domain string + Network string + QUICConn quic.EarlyConnection + TLSConfig *tls.Config + TLSState tls.ConnectionState + Trace Trace + type ResolvedAddress struct + Address string + Domain string + type ResolvedAddresses struct + Addresses []string + Domain string + func (ra *ResolvedAddresses) Flatten() (out []*ResolvedAddress) + type Runtime interface + Close func() error + IDGenerator func() *atomic.Int64 + Logger func() model.Logger + MaybeTrackConn func(conn io.Closer) + NewTrace func(index int64, zeroTime time.Time, tags ...string) Trace + Observations func() *Observations + SaveObservations func(obs ...*Observations) + ZeroTime func() time.Time + type RuntimeMeasurexLite struct + func NewRuntimeMeasurexLite(logger model.Logger, zeroTime time.Time, options ...RuntimeMeasurexLiteOption) *RuntimeMeasurexLite + func (p *RuntimeMeasurexLite) NewTrace(index int64, zeroTime time.Time, tags ...string) Trace + type RuntimeMeasurexLiteOption func(rt *RuntimeMeasurexLite) + func RuntimeMeasurexLiteOptionMeasuringNetwork(netx model.MeasuringNetwork) RuntimeMeasurexLiteOption + type Stats struct + func NewStats[T any]() *Stats[T] + func (s *Stats[T]) Export() (out map[string]int64) + func (s *Stats[T]) Observer() Func[T, T] + type TCPConnection struct + Address string + Conn net.Conn + Domain string + Network string + Trace Trace + type TLSConnection struct + Address string + Conn netxlite.TLSConn + Domain string + Network string + TLSState tls.ConnectionState + Trace Trace + type TLSHandshakeOption func(config *tls.Config) + func TLSHandshakeOptionInsecureSkipVerify(value bool) TLSHandshakeOption + func TLSHandshakeOptionNextProto(value []string) TLSHandshakeOption + func TLSHandshakeOptionRootCAs(value *x509.CertPool) TLSHandshakeOption + func TLSHandshakeOptionServerName(value string) TLSHandshakeOption + type Trace interface + CloneBytesReceivedMap func() (out map[string]int64) + DNSLookupsFromRoundTrip func() (out []*model.ArchivalDNSLookupResult) + Index func() int64 + NetworkEvents func() (out []*model.ArchivalNetworkEvent) + NewDialerWithoutResolver func(dl model.DebugLogger, wrappers ...model.DialerWrapper) model.Dialer + NewParallelUDPResolver func(logger model.DebugLogger, dialer model.Dialer, address string) model.Resolver + NewQUICDialerWithoutResolver func(listener model.UDPListener, dl model.DebugLogger, ...) model.QUICDialer + NewStdlibResolver func(logger model.DebugLogger) model.Resolver + NewTLSHandshakerStdlib func(dl model.DebugLogger) model.TLSHandshaker + NewUDPListener func() model.UDPListener + QUICHandshakes func() (out []*model.ArchivalTLSOrQUICHandshakeResult) + TCPConnects func() (out []*model.ArchivalTCPConnectResult) + TLSHandshakes func() (out []*model.ArchivalTLSOrQUICHandshakeResult) + Tags func() []string + TimeSince func(t0 time.Time) time.Duration + ZeroTime func() time.Time + type Void struct