Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetDumper ¶
type NetDumper struct { // MaxDumpsPerTopic : maximum number of archives with network diagnostic information // (aka network dumps) that can be persistent at the same time for a given topic. // NetDumper will remove the oldest network dump of a given topic before publishing // a new one that would otherwise exceed this limit. // By default (zero value), there is no limit. // Can be changed between calls to Publish. MaxDumpsPerTopic int }
NetDumper publishes (writes to /persist/netdump) tar.gz archives containing network diagnostic information for post-mortem analysis of device connectivity issues.
func (*NetDumper) LastPublishAt ¶
LastPublishAt returns timestamp of the last publication for any of the given topics. Returns zero timestamp (and nil error) if nothing has been published yet.
func (*NetDumper) Publish ¶
func (dumper *NetDumper) Publish(topic string, requests ...TracedNetRequest) (filepath string, err error)
Publish a single netdump archive, containing information such as the current DPCL (DevicePortConfigList), DNS (DeviceNetworkStatus), ifconfig output, DHCP leases, wwan status and more. Additionally, it is possible to attach traces and packet captures recorded during an execution of one or more network requests (i.e. requests targeted at remote endpoints and carried over the network). In order to avoid race conditions between microservices, each microservice should use different topic(s) (e.g. topic = microservice name). Topic name should not contain characters which are not suitable for filenames (across all OSes).
type TracedNetRequest ¶
type TracedNetRequest struct { // RequestName : name of the executed request that had its network operations traced. // It is used as a dirname inside the published netdump. // Avoid characters which are not suitable for filenames (across all OSes). RequestName string // NetTrace : summary of all network operations performed from within the given request. NetTrace nettrace.AnyNetTrace // PacketCaptures obtained for selected interfaces during the request execution. PacketCaptures []nettrace.PacketCapture }
TracedNetRequest : trace and potentially one or more packet captures obtained during a request targeted at a remote endpoint (i.e. carried over the network).