Documentation ¶
Index ¶
Constants ¶
const ( OPEN uint32 = 0 CLOSED uint32 = 1 )
const InstantMaxSamples = 50000
InstantMaxSamples - Maximum number of samples to calculate instantaneous stats with (rate & delay)
const InstantMinSamples = 5
InstantMinSamples - Minimum number of samples to calculate instantaneous stats with (rate & delay)
const InstantSampleSeconds = 10
InstantSampleSeconds - Duration of data samples to calculate instantaneous stats with
const MaxElapsedTime = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsCollector ¶ added in v0.6.0
type MetricsCollector struct {
// contains filtered or unexported fields
}
MetricsCollector holds metrics used to display pass report and instantaneous stats
func NewMetricsCollector ¶ added in v0.6.0
func NewMetricsCollector(logger func(format string, v ...interface{})) *MetricsCollector
NewMetricsCollector creates a stats collector
func (*MetricsCollector) StartStatsEmitScheduler ¶ added in v0.6.1
func (metrics *MetricsCollector) StartStatsEmitScheduler(emitRateMillis int)
StartStatsEmitScheduler start process to emit stats at defined interval
func (*MetricsCollector) StopStatsEmitScheduler ¶ added in v0.6.1
func (metrics *MetricsCollector) StopStatsEmitScheduler(emitRateMillis int)
StopStatsEmitScheduler stop the emitting stats process
type Proxy ¶ added in v0.1.2
type Proxy interface { // Close the proxy. Close() error // Start listening for packets to send to the satellite and sending back received packets. Start(o *SatelliteStreamOptions) (func(), error) }
Proxy is the interface to send and receive packets.
func NewConnectionWithoutProxy ¶ added in v0.8.0
Create a connection without using a proxy.
func NewTCPProxy ¶ added in v0.1.2
func NewTCPProxy(o *TCPProxyOptions) (Proxy, error)
Create a UDPProxy.
func NewUDPProxy ¶ added in v0.1.2
func NewUDPProxy(o *UDPProxyOptions) (Proxy, error)
Create a UDPProxy.
type SatelliteStream ¶
func OpenSatelliteStream ¶
func OpenSatelliteStream(o *SatelliteStreamOptions, receiveChan chan<- []byte) (SatelliteStream, func(), error)
OpenSatelliteStream opens a stream to a satellite over the StellarStation API.
type SatelliteStreamOptions ¶ added in v0.1.2
type TCPProxyOptions ¶ added in v0.1.2
type TCPProxyOptions struct {
Addr string
}