transport

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const Broadcast = ""

Broadcast can be used as destination when a bundle should be broadcasted.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Destination string `json:"destination"`
	ID          string `json:"id"`
	MsgType     string `json:"msgType"`
	Version     string `json:"version"`
	Payload     []byte `json:"payload"`
}

Message abstracts a message object to be used by different transport components.

type Transport

type Transport interface {
	// SendAsync sends a message to the transport component asynchronously.
	//
	// destinationHubName specifies a specific destination for distribution or specifies broadcasting if empty.
	SendAsync(destinationHubName string, id string, msgType string, version string, payload []byte)
	// Start starts the transport.
	Start()
	// Stop stops the transport.
	Stop()
}

Transport is the transport layer interface to be consumed by the spec transport bridge.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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