package
3.25.0-alpha
Repository: https://github.com/ooni/probe-cli.git
Documentation: pkg.go.dev

# Functions

ApplyAsync is equivalent to calling Apply but returns a channel.
Collect collects all the elements inside a channel under the assumption that the channel will be closed to signal EOF.
Compose10 composes N=10 functions.
Compose11 composes N=11 functions.
Compose12 composes N=12 functions.
Compose13 composes N=13 functions.
Compose14 composes N=14 functions.
Compose2 composes two operations such as [TCPConnect] and [TLSHandshake].
Compose3 composes N=3 functions.
Compose4 composes N=4 functions.
Compose5 composes N=5 functions.
Compose6 composes N=6 functions.
Compose7 composes N=7 functions.
Compose8 composes N=8 functions.
Compose9 composes N=9 functions.
Discard transforms any type to [Void].
DNSLookupGetaddrinfo returns a function that resolves a domain name to IP addresses using libc's getaddrinfo function.
DNSLookupOptionTags allows to set tags to tag observations.
DNSLookupParallel runs DNS lookups in parallel.
DNSLookupUDP returns a function that resolves a domain name to IP addresses using the given DNS-over-UDP resolver.
EndpointOptionDomain allows to set the domain.
EndpointOptionTags allows to set tags to tag observations.
HTTPConnectionQUIC converts a QUIC connection into an HTTP connection.
HTTPConnectionTCP converts a TCP connection into an HTTP connection.
HTTPConnectionTLS converts a TLS connection into an HTTP connection.
HTTPRequest issues an HTTP request using a transport and returns a response.
HTTPRequestOptionAccept sets the Accept header.
HTTPRequestOptionAcceptLanguage sets the Accept header.
HTTPRequestOptionHost sets the Host header.
HTTPRequestOptionHost sets the request method.
HTTPRequestOptionReferer sets the Referer header.
HTTPRequestOptionURLPath sets the URL path.
HTTPRequestOptionUserAgent sets the UserAgent header.
HTTPRequestOverQUIC returns a Func that issues HTTP requests over QUIC.
HTTPRequestOverTCP returns a Func that issues HTTP requests over TCP.
HTTPRequestOverTLS returns a Func that issues HTTP requests over TLS.
MakeEndpoint returns a [Func] that creates an [*Endpoint] given [*ResolvedAddress].
Map applies fx to the list of elements produced by a generator channel.
Matrix invokes each function on each input using N goroutines and streams the results to a channel.
MeasureResolvedAddresses returns a [Func] that measures the resolved addresses provided as the input argument using each of the provided functions.
MinimalRuntimeOptionMeasuringNetwork configures the [model.MeasuringNetwork] to use.
NewAddressSet creates a new address set from optional addresses resolved by DNS.
NewDomainToResolve creates input for performing DNS lookups.
NewEndpoint creates a new network endpoint (i.e., a three tuple composed of a network protocol, an IP address, and a port).
NewMaybeWithError constructs a Maybe containing the given error.
NewMaybeWithValue constructs a Maybe containing the given value.
NewMinimalRuntime creates a minimal [Runtime] implementation.
NewObservations initializes all measurements to empty arrays and returns the Observations skeleton.
NewRuntimeMeasurexLite creates a [Runtime] using [measurexlite] to collect [*Observations].
NewStats creates a [*Stats] instance.
Parallel executes f1...fn in parallel over the same input.
ParallelAsync is like Parallel but deals with channels.
QUICHandshake returns a function performing QUIC handshakes.
RuntimeMeasurexLiteOptionMeasuringNetwork allows to configure which [model.MeasuringNetwork] to use.
StreamList creates a channel out of static values.
TCPConnect returns a function that establishes TCP connections.
TLSHandshake returns a function performing TSL handshakes.
TLSHandshakeOptionInsecureSkipVerify controls whether TLS verification is enabled.
TLSHandshakeOptionNextProto allows to configure the ALPN protocols.
TLSHandshakeOptionRootCAs allows to configure custom root CAs.
TLSHandshakeOptionServerName allows to configure the SNI to use.
Zip zips together results from many channels under the assumption that each channel will be closed when it has streamed all elements.
ZipAndCollect is syntactic sugar for Collect(Zip(sources...)).

# Variables

ErrDNSLookupParallel indicates that DNSLookupParallel failed.
ErrSkip is an error that indicates that we already processed an error emitted by a previous stage, so we are using this error to avoid counting the original error more than once when computing statistics, e.g., in [*Stats].

# Structs

AddressSet is a set of IP addresses.
DomainToResolve is the input for DNS lookup functions.
Endpoint is a network endpoint along with configuration for measuring it.
HTTPConnection is an HTTP connection bound to a TCP, TLS or QUIC connection that would use such a connection only and for any input URL.
HTTPResponse is the response generated by an HTTP requests.
Maybe is the result of an operation implemented by this package that may fail such as [TCPConnect] or [TLSHandshake].
MinimalRuntime is a minimal [Runtime] implementation.
Observations is the skeleton shared by most OONI measurements where we group observations by type using standard test keys.
QUICConnection is an established QUIC connection.
ResolvedAddress is a single address resolved using a DNS lookup function.
ResolvedAddresses contains the results of DNS lookups.
RuntimeMeasurexLite uses [measurexlite] to collect [*Observations.].
Stats measures the number of successes and failures.
TCPConnection is an established TCP connection.
TLSConnection is an established TLS connection.
Void is the empty data structure.

# Interfaces

Func is a function f: (context.Context, A) -> B.
Runtime is the runtime in which we execute the DSL.
Trace collects [*Observations] using tracing.

# Type aliases

DNSLookupOption is an option you can pass to NewDomainToResolve.
DomainName is a domain name to resolve.
No description provided by the author
No description provided by the author
EndpointOption is an option you can use to construct EndpointState.
EndpointPort is the port for an endpoint.
FuncAdapter adapts a func to be a [Func].
HTTPRequestOption is an option you can pass to HTTPRequest.
MinimalRuntimeOption is an option for configuring the [*MinimalRuntime].
Operation adapts a golang function to behave like a Func.
Parallelism is the type used to specify parallelism.
RuntimeMeasurexLiteOption is an option for initializing a [*RuntimeMeasurexLite].
TLSHandshakeOption is an option you can pass to TLSHandshake.