receiver

package
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package receiver implements the messages receiver. It can be used both by the download and the upload subtests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartDownloadReceiver

func StartDownloadReceiver(ctx context.Context, conn *websocket.Conn) <-chan model.Measurement

StartDownloadReceiver starts the receiver in a background goroutine and returns the messages received from the client in the returned channel.

This receiver will not tolerate receiving binary messages. It will terminate early if such a message is received.

Liveness guarantee: the goroutine will always terminate after a MaxRuntime timeout, provided that the consumer will keep reading from the returned channel.

func StartUploadReceiver

func StartUploadReceiver(ctx context.Context, conn *websocket.Conn) <-chan model.Measurement

StartUploadReceiver is like StartDownloadReceiver except that it tolerates incoming binary messages, which are sent to cause network load, and therefore must not be rejected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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