stream

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPEN   uint32 = 0
	CLOSED uint32 = 1
)
View Source
const InstantMaxSamples = 50000

InstantMaxSamples - Maximum number of samples to calculate instantaneous stats with (rate & delay)

View Source
const InstantMinSamples = 5

InstantMinSamples - Minimum number of samples to calculate instantaneous stats with (rate & delay)

View Source
const InstantSampleSeconds = 10

InstantSampleSeconds - Duration of data samples to calculate instantaneous stats with

View Source
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

func NewConnectionWithoutProxy() (Proxy, error)

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

type SatelliteStream interface {
	Send(payload []byte) error

	io.Closer
}

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 SatelliteStreamOptions struct {
	AcceptedFraming []stellarstation.Framing
	SatelliteID     string
	StreamId        string
	PlanId          string
	GroundStationId string
	IsDebug         bool
	IsVerbose       bool
	ShowStats       bool
	TelemetryFile   *os.File

	CorrectOrder   bool
	DelayThreshold time.Duration

	EnableAutoClose bool
}

type TCPProxyOptions added in v0.1.2

type TCPProxyOptions struct {
	Addr string
}

type UDPProxyOptions added in v0.1.2

type UDPProxyOptions struct {
	RecvAddr string
	SendAddr string
}

Jump to

Keyboard shortcuts

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