Documentation
¶
Overview ¶
Package dds defines the Go interface for Data Distribution Service (DDS) publish/subscribe operations.
The interface is intentionally narrow: it covers the pub/sub primitives needed for vehicle-signal transport and nothing more.
Choose an implementation by importing one of the sub-packages and calling its New function:
import "github.com/SoundMatt/go-DDS/mock" // in-process, no CGo import "github.com/SoundMatt/go-DDS/cyclone" // CycloneDDS via CGo import "github.com/SoundMatt/go-DDS/rtps" // pure-Go RTPS/UDP
All packages expose a New(Domain) (Participant, error) constructor that satisfies this package's Participant interface.
Index ¶
- Constants
- Variables
- func Adapt(p Participant) relay.Node
- func CloseWithDrain(ctx context.Context, p Participant) error
- func ValidateDomain(d Domain) error
- type BackPressurePolicy
- type Codec
- type DiscoveryMetrics
- type DiscoveryMetricsProvider
- type Domain
- type Drainer
- type DurabilityKind
- type GUID
- type GobCodec
- type Health
- type HealthProvider
- type HealthStatus
- type JSONCodec
- type LivelinessEvent
- type LoaningPublisher
- type Metrics
- type MetricsProvider
- type Participant
- type ProtoCodec
- type Publisher
- type QoS
- type ReliabilityKind
- type Sample
- type Span
- type SpanAttribute
- type Subscriber
- type SubscriberConfig
- type SubscriberOption
- type TopicMetrics
- type TopicMetricsProvider
- type Tracer
- type TypedPublisher
- type TypedSample
- type TypedSubscriber
- type WaitSet
Examples ¶
Constants ¶
const SpecVersion = relay.SpecVersion
SpecVersion is the RELAY spec version this package conforms to (§17 req 12). It tracks the linked RELAY module's constant so the two never drift; bumping the RELAY dependency advances this automatically.
Variables ¶
var DefaultQoS = QoS{ Reliability: BestEffort, Durability: Volatile, HistoryDepth: 1, }
DefaultQoS is BestEffort + Volatile with implementation-default history.
var ErrAccessDenied = errors.New("dds: access denied by topic ACL")
ErrAccessDenied is returned when a topic ACL forbids creating a publisher or subscriber for the requested topic. It is only ever returned when an access controller has been configured on the participant.
var ErrClosed = fmt.Errorf("dds: entity is closed: %w", relay.ErrClosed)
ErrClosed is returned when an operation is attempted on a closed entity.
var ErrDeadlineMissed = fmt.Errorf("dds: deadline missed — no sample within QoS.Deadline period: %w", relay.ErrTimeout)
ErrDeadlineMissed is returned when a subscriber receives no sample within its QoS.Deadline period. Wraps relay.ErrTimeout per spec §5.3.
var ErrDomainOutOfRange = fmt.Errorf("dds: domain out of range [0,232]: %w", ErrNotConnected)
ErrDomainOutOfRange is returned when a Domain value is outside 0–232 inclusive (spec §15.2 dds.Domain). It wraps ErrNotConnected so callers that already test for a participant start-up failure continue to match.
var ErrLoanBuffer = errors.New("dds: loan buffer unavailable or invalid")
ErrLoanBuffer is returned when a loaned buffer cannot be obtained (pool exhausted or size exceeds pool capacity) or when Commit is called with a buffer that was not issued by the same LoaningPublisher.
var ErrNotConnected = fmt.Errorf("dds: not connected: %w", relay.ErrNotConnected)
ErrNotConnected is returned before a Participant has joined its domain or when socket allocation fails at startup.
var ErrPayloadTooLarge = fmt.Errorf("dds: payload exceeds QoS MaxSampleSize: %w", relay.ErrPayloadTooLarge)
ErrPayloadTooLarge is returned when Write is called with a payload that exceeds the MaxSampleSize set in the publisher's QoS.
var ErrQoSMismatch = errors.New("dds: QoS incompatibility between publisher and subscriber")
ErrQoSMismatch is returned when a publisher and subscriber have incompatible QoS policies.
var ErrResourceLimits = errors.New("dds: resource limit exceeded")
ErrResourceLimits is returned when a resource limit is exceeded.
var ErrSampleRejected = fmt.Errorf("dds: sample rejected — resource limits exceeded: %w", relay.ErrPayloadTooLarge)
ErrSampleRejected is returned when a sample is rejected because resource limits are exceeded. Wraps relay.ErrPayloadTooLarge per spec §5.3.
var ErrTimeout = fmt.Errorf("dds: timeout: %w", relay.ErrTimeout)
ErrTimeout is returned when an operation does not complete within the permitted time (e.g. WriteCtx with an expired context).
var ErrTopicEmpty = errors.New("dds: topic name must not be empty")
ErrTopicEmpty is returned when an empty topic string is passed.
var ReliableQoS = QoS{ Reliability: Reliable, Durability: TransientLocal, HistoryDepth: 1, }
ReliableQoS is Reliable + TransientLocal. Use for actuator commands and any topic where a late-joining subscriber must receive the current value.
Functions ¶
func Adapt ¶ added in v0.41.0
func Adapt(p Participant) relay.Node
Adapt wraps p as a relay.Node (spec §10.3). Send publishes to the topic named by msg.ID, caching publishers by topic for efficiency. Subscribe returns a channel that closes when the node closes; DDS subscriptions are topic-specific — use Participant.NewSubscriber for per-topic receive paths.
func CloseWithDrain ¶ added in v0.4.0
func CloseWithDrain(ctx context.Context, p Participant) error
CloseWithDrain waits for all pending reliable ACKs then closes p. If p does not implement Drainer, it calls p.Close() directly.
func ValidateDomain ¶ added in v0.42.0
ValidateDomain returns ErrDomainOutOfRange if d is outside 0–232 inclusive, matching the RELAY dds.Domain canonical range (spec §15.2). It is the single source of truth for domain validation across all transports.
Types ¶
type BackPressurePolicy ¶ added in v0.4.0
type BackPressurePolicy int
BackPressurePolicy controls what happens when a subscriber's channel is full.
const ( // DropNewest silently discards the incoming sample when the channel is full. // This is the default policy and matches pre-v0.4 behaviour. DropNewest BackPressurePolicy = iota // DropOldest evicts the oldest queued sample to make room for the new one. DropOldest // Block waits until the channel has capacity (may block the writer goroutine). Block )
type Codec ¶ added in v0.4.0
Codec[T] marshals and unmarshals values of type T to/from []byte. Implement this interface to bind a schema (JSON, protobuf, msgpack, …) to a TypedPublisher or TypedSubscriber.
type DiscoveryMetrics ¶ added in v0.6.0
type DiscoveryMetrics struct {
AnnouncesSent uint64 // SPDP announcements sent
AnnouncesReceived uint64 // SPDP announcements received from remote peers
PeersKnown uint64 // current number of known remote participants
PeerEvictions uint64 // cumulative peers evicted due to lease expiry
EndpointMatches uint64 // cumulative topic endpoint matches (local↔remote)
}
DiscoveryMetrics holds cumulative discovery statistics for a participant.
type DiscoveryMetricsProvider ¶ added in v0.6.0
type DiscoveryMetricsProvider interface {
DiscoveryMetrics() DiscoveryMetrics
}
DiscoveryMetricsProvider is implemented by participants that expose discovery-layer statistics.
type Domain ¶
type Domain int
Domain is a DDS domain identifier (0–232 inclusive per the DDS spec). Participants on the same domain and network segment discover each other automatically without a broker.
type Drainer ¶ added in v0.4.0
Drainer is optionally implemented by Participants that support graceful shutdown: waiting for all in-flight reliable writes to be acknowledged before closing. If a Participant does not implement Drainer, CloseWithDrain falls back to a plain Close.
type DurabilityKind ¶
type DurabilityKind int
DurabilityKind controls whether late-joining subscribers receive historical samples that were published before they joined.
const ( // Volatile discards samples as soon as they are delivered. Volatile DurabilityKind = iota // TransientLocal retains the last N samples so that late joiners // receive current state on subscription. TransientLocal )
type GUID ¶ added in v0.4.0
type GUID [16]byte
GUID is a globally unique 16-byte DDS participant or endpoint identifier. The first 12 bytes are the GuidPrefix; the last 4 bytes are the EntityId.
type GobCodec ¶ added in v0.9.1
type GobCodec[T any] struct{}
GobCodec[T] implements Codec[T] using encoding/gob. It is a zero-size struct; the zero value is ready to use. Suitable for concrete struct types exchanged within a single Go binary.
type Health ¶ added in v0.6.0
type Health struct {
// Status is the overall health classification.
Status HealthStatus `json:"status"`
// Details carries an optional human-readable or JSON-encoded string
// describing per-subsystem state. Empty string means no details.
Details string `json:"details,omitempty"`
}
Health is a point-in-time health snapshot for a participant.
type HealthProvider ¶ added in v0.6.0
type HealthProvider interface {
Health() Health
}
HealthProvider is implemented by participants that expose health reporting.
type HealthStatus ¶ added in v0.6.0
type HealthStatus int
HealthStatus is the overall operational status of a participant.
const ( // HealthOK means the participant is running normally. HealthOK HealthStatus = iota // HealthDegraded means the participant is running with reduced capability. HealthDegraded // HealthDown means the participant has been closed or has failed. HealthDown )
func (HealthStatus) String ¶ added in v0.6.0
func (h HealthStatus) String() string
String returns a lowercase, JSON-friendly representation of the status.
type JSONCodec ¶ added in v0.4.0
type JSONCodec[T any] struct{}
JSONCodec[T] implements Codec[T] using encoding/json. It is a zero-size struct; the zero value is ready to use.
type LivelinessEvent ¶ added in v0.4.0
type LivelinessEvent int
LivelinessEvent reports whether a remote participant has been discovered or lost its lease.
const ( // LivelinessGained fires when a new remote participant is discovered via SPDP. LivelinessGained LivelinessEvent = iota // LivelinessLost fires when a remote participant's lease has expired. LivelinessLost )
type LoaningPublisher ¶ added in v0.16.0
type LoaningPublisher interface {
Publisher
// Loan returns a pre-allocated byte slice of the given size backed by the
// publisher's internal pool. Returns ErrLoanBuffer if the pool is exhausted
// or size exceeds the pool's configured capacity.
Loan(size int) ([]byte, error)
// Commit publishes the loaned buffer (by calling Write) and returns it to
// the pool. buf must be a slice previously returned by Loan on this same
// publisher. The buffer must not be used after Commit returns.
Commit(buf []byte) error
}
LoaningPublisher extends Publisher with zero-copy loaned-sample support. Use Loan to obtain a pre-allocated buffer from the publisher's internal pool, write payload data into it, then call Commit to publish and return the buffer. Commit calls Write internally; the buffer is returned to the pool afterwards regardless of whether Write succeeds.
The loaned buffer must not be used after Commit returns.
type Metrics ¶ added in v0.3.0
type Metrics struct {
WriteCount uint64 `json:"write_count"`
DeliverCount uint64 `json:"deliver_count"`
DropCount uint64 `json:"drop_count"`
BytesWritten uint64 `json:"bytes_written"`
BytesDelivered uint64 `json:"bytes_delivered"`
ErrorCount uint64 `json:"error_count"`
}
Metrics holds cumulative statistics for a participant.
type MetricsProvider ¶ added in v0.3.0
type MetricsProvider interface {
Metrics() Metrics
}
MetricsProvider is implemented by participants that expose runtime statistics.
type Participant ¶
type Participant interface {
// NewPublisher creates a writer for the named topic using the given QoS.
NewPublisher(topic string, qos QoS) (Publisher, error)
// NewSubscriber creates a reader for the named topic using the given QoS.
// Optional SubscriberOption values configure content filtering and other
// per-subscriber policies.
NewSubscriber(topic string, qos QoS, opts ...SubscriberOption) (Subscriber, error)
// Domain returns the DDS domain this participant joined.
Domain() Domain
// Close releases all DDS resources held by this participant.
Close() error
}
Participant is the DDS domain participant — the root factory for all DDS entities. Create one per process per domain. A Participant is safe for concurrent use from multiple goroutines.
type ProtoCodec ¶ added in v0.10.0
ProtoCodec[T] implements Codec[T] using google.golang.org/protobuf. T must be a pointer to a protobuf-generated message struct (e.g. *mypkg.Msg). The zero value is ready to use.
func (ProtoCodec[T]) Marshal ¶ added in v0.10.0
func (ProtoCodec[T]) Marshal(v T) ([]byte, error)
Marshal encodes v to protobuf wire format.
func (ProtoCodec[T]) Unmarshal ¶ added in v0.10.0
func (ProtoCodec[T]) Unmarshal(data []byte) (T, error)
Unmarshal decodes data from protobuf wire format into a new T.
type Publisher ¶
type Publisher interface {
Write(payload []byte) error
// WriteCtx is Write with context cancellation support. If ctx is already
// done when WriteCtx is called it returns ctx.Err() immediately.
WriteCtx(ctx context.Context, payload []byte) error
Close() error
}
Publisher writes samples to a single DDS topic. A Publisher is safe for concurrent use from multiple goroutines.
type QoS ¶
type QoS struct {
Reliability ReliabilityKind `json:"reliability"`
Durability DurabilityKind `json:"durability"`
HistoryDepth int `json:"history_depth"` // 0 means implementation default (typically 1)
Deadline time.Duration `json:"deadline"` // 0 = disabled
// TransportPriority sets the network-level priority (maps to VLAN PCP /
// SO_PRIORITY on Linux). 0 = normal, 1–7 = elevated; 7 is highest.
TransportPriority int `json:"transport_priority"`
// LatencyBudget is the acceptable end-to-end delivery latency for this
// endpoint. 0 = unspecified. Informational in v0.5; future releases may
// enforce it via qdisc admission control.
LatencyBudget time.Duration `json:"latency_budget"`
// Lifespan is the sample time-to-live measured from the write timestamp.
// Samples older than Lifespan are dropped before delivery. 0 = infinite.
Lifespan time.Duration `json:"lifespan"`
// PublishPeriod is the periodic publish rate for TSN streams. 0 = aperiodic.
// The application is responsible for calling Write at this rate; the value
// is used by TSN stream reservation and scheduling.
PublishPeriod time.Duration `json:"publish_period"`
// MaxSampleSize is the maximum Write payload size in bytes. Write returns
// ErrPayloadTooLarge if the payload exceeds this limit. 0 = unlimited.
MaxSampleSize int `json:"max_sample_size"`
}
QoS bundles the policies that govern a single publisher or subscriber endpoint.
type ReliabilityKind ¶
type ReliabilityKind int
ReliabilityKind controls delivery guarantees for a topic endpoint.
const ( // BestEffort delivers samples without retransmission. Suitable for // high-frequency sensor data where occasional loss is acceptable. BestEffort ReliabilityKind = iota // Reliable retransmits lost samples until acknowledged. Required for // command/control and actuator writes. Reliable )
type Sample ¶
type Sample struct {
Topic string `json:"topic"`
Payload []byte `json:"payload"`
Timestamp time.Time `json:"timestamp"`
SequenceNumber uint64 `json:"seq"` // monotonically increasing per writer; 0 = not set
WriterGUID GUID `json:"writer_guid"` // identity of the publishing endpoint; zero = not set
}
Sample is a single data sample delivered to a Subscriber. Timestamp is the source time of the write; zero means no timestamp was set (INFO_TS was not present in the RTPS message, or the mock transport was used).
func FromMessage ¶ added in v0.41.0
FromMessage converts a relay.Message envelope back to a Sample (spec §15.7.2).
type Span ¶ added in v0.4.0
type Span interface {
// SetAttribute attaches a key/value attribute to the span.
SetAttribute(key, value string)
// End finalises the span and records it to the tracer backend.
End()
}
Span is a single tracing span. Call End when the operation is complete.
type SpanAttribute ¶ added in v0.4.0
SpanAttribute is a key/value pair attached to a tracing span.
type Subscriber ¶
type Subscriber interface {
C() <-chan Sample
// TryRead attempts a non-blocking read. Returns (zero, false) when the
// channel is empty or closed.
TryRead() (Sample, bool)
// Unsubscribe removes this subscriber from the topic without closing its
// channel. After Unsubscribe the channel remains open but no new samples
// are delivered. Call Close to stop delivery AND close the channel.
// Idempotent; second call is a no-op (spec §6.4).
Unsubscribe()
Close() error
}
Subscriber reads samples from a single DDS topic as a Go channel. A Subscriber is safe for concurrent use from multiple goroutines.
type SubscriberConfig ¶ added in v0.3.0
type SubscriberConfig struct {
Filter func(Sample) bool
ChannelDepth int // 0 = implementation default (64)
BackPressure BackPressurePolicy // default: DropNewest
DeadlineMissedCallback func() // called when subscriber deadline expires; nil = disabled
}
SubscriberConfig holds per-subscriber options applied at construction time. It is exported so that implementation packages (mock, rtps, cyclone) can read the resolved configuration without duplicating the option-merge logic.
func ApplySubscriberOpts ¶ added in v0.3.0
func ApplySubscriberOpts(opts []SubscriberOption) SubscriberConfig
ApplySubscriberOpts merges a slice of SubscriberOption into a SubscriberConfig.
func (SubscriberConfig) ChanDepth ¶ added in v0.4.0
func (c SubscriberConfig) ChanDepth(defaultDepth int) int
ChanDepth returns the resolved channel depth: cfg.ChannelDepth if > 0, otherwise the provided default.
type SubscriberOption ¶ added in v0.3.0
type SubscriberOption func(*SubscriberConfig)
SubscriberOption configures a subscriber at creation time.
func WithBackPressure ¶ added in v0.4.0
func WithBackPressure(policy BackPressurePolicy) SubscriberOption
WithBackPressure sets the back-pressure policy applied when the subscriber channel is full. The default policy is DropNewest.
func WithChannelDepth ¶ added in v0.4.0
func WithChannelDepth(n int) SubscriberOption
WithChannelDepth sets the capacity of the subscriber's internal channel. A depth of 0 uses the implementation default (typically 64).
func WithDeadlineMissed ¶ added in v0.9.1
func WithDeadlineMissed(fn func()) SubscriberOption
WithDeadlineMissed registers fn to be called when the subscriber has not received a sample within its QoS.Deadline period. fn must be non-nil. Has no effect when QoS.Deadline == 0 on the subscriber.
func WithFilter ¶ added in v0.3.0
func WithFilter(fn func(Sample) bool) SubscriberOption
WithFilter returns a SubscriberOption that applies fn as a content filter. Only samples for which fn returns true are delivered to the subscriber's channel; non-matching samples are discarded silently.
type TopicMetrics ¶ added in v0.6.0
type TopicMetrics struct {
Topic string
WriteCount uint64
DeliverCount uint64
DropCount uint64
BytesWritten uint64
BytesDelivered uint64
}
TopicMetrics holds per-topic statistics for a single DDS topic.
type TopicMetricsProvider ¶ added in v0.6.0
type TopicMetricsProvider interface {
TopicMetrics() []TopicMetrics
}
TopicMetricsProvider is implemented by participants that expose per-topic statistics. The returned slice contains one entry per observed topic.
type Tracer ¶ added in v0.4.0
type Tracer interface {
Start(ctx context.Context, spanName string, attrs ...SpanAttribute) (context.Context, Span)
}
Tracer is satisfied by any OpenTelemetry-compatible tracer implementation. go-DDS does not import go.opentelemetry.io/otel; callers bridge their tracer to this interface using a thin adapter.
var NoopTracer Tracer = noopTracerImpl{}
NoopTracer is the zero-cost tracer used when no OTel backend is configured.
type TypedPublisher ¶ added in v0.4.0
type TypedPublisher[T any] struct { // contains filtered or unexported fields }
TypedPublisher[T] wraps a Publisher to encode values with a Codec before writing.
func NewTypedPublisher ¶ added in v0.4.0
func NewTypedPublisher[T any](pub Publisher, codec Codec[T]) *TypedPublisher[T]
NewTypedPublisher wraps pub so that Write accepts T values, encoding them with codec before passing bytes to the underlying Publisher.
func (*TypedPublisher[T]) Close ¶ added in v0.4.0
func (tp *TypedPublisher[T]) Close() error
Close closes the underlying publisher.
func (*TypedPublisher[T]) Write ¶ added in v0.4.0
func (tp *TypedPublisher[T]) Write(v T) error
Write encodes v with the configured Codec and writes it to the underlying publisher.
type TypedSample ¶ added in v0.4.0
type TypedSample[T any] struct { Topic string Value T Timestamp time.Time SequenceNumber uint64 WriterGUID GUID }
TypedSample[T] is a decoded sample delivered by TypedSubscriber[T].
type TypedSubscriber ¶ added in v0.4.0
type TypedSubscriber[T any] struct { // contains filtered or unexported fields }
TypedSubscriber[T] wraps a Subscriber to decode samples with a Codec. Samples that fail to decode are silently dropped.
func NewTypedSubscriber ¶ added in v0.4.0
func NewTypedSubscriber[T any](sub Subscriber, codec Codec[T]) *TypedSubscriber[T]
NewTypedSubscriber wraps sub so that its channel delivers TypedSample[T] values decoded with codec. A background goroutine pumps samples from sub.C().
func (*TypedSubscriber[T]) C ¶ added in v0.4.0
func (ts *TypedSubscriber[T]) C() <-chan TypedSample[T]
C returns the typed sample channel.
func (*TypedSubscriber[T]) Close ¶ added in v0.4.0
func (ts *TypedSubscriber[T]) Close() error
Close stops the pump goroutine and closes the underlying subscriber.
type WaitSet ¶
type WaitSet struct {
// contains filtered or unexported fields
}
WaitSet multiplexes over a dynamic set of Subscribers. Use NewWaitSet to construct one and Attach/Detach to modify the set at any time. Wait blocks until one of the attached subscribers delivers a sample.
func NewWaitSet ¶
func NewWaitSet(subs ...Subscriber) *WaitSet
NewWaitSet creates a WaitSet that monitors the given subscribers.
Example ¶
ExampleNewWaitSet demonstrates multiplexing over two subscribers without a polling loop. The WaitSet blocks until any attached subscriber delivers a sample, then returns it together with the subscriber it arrived on.
package main
import (
"context"
"fmt"
"time"
dds "github.com/SoundMatt/go-DDS"
"github.com/SoundMatt/go-DDS/mock"
)
func main() {
p, err := mock.New(dds.Domain(0))
if err != nil {
panic("New: " + err.Error())
}
defer p.Close()
subTemp, err := p.NewSubscriber("sensors/temp", dds.DefaultQoS)
if err != nil {
panic("NewSubscriber: " + err.Error())
}
subSpeed, err := p.NewSubscriber("vehicle/speed", dds.DefaultQoS)
if err != nil {
panic("NewSubscriber: " + err.Error())
}
defer func() { _ = subTemp.Close() }()
defer func() { _ = subSpeed.Close() }()
pubTemp, err := p.NewPublisher("sensors/temp", dds.DefaultQoS)
if err != nil {
panic("NewPublisher: " + err.Error())
}
defer func() { _ = pubTemp.Close() }()
_ = pubTemp.Write([]byte("21.5"))
ws := dds.NewWaitSet(subTemp, subSpeed)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
sample, sub, err := ws.Wait(ctx)
if err != nil {
fmt.Println("error:", err)
return
}
switch sub {
case subTemp:
fmt.Println("temp:", string(sample.Payload))
case subSpeed:
fmt.Println("speed:", string(sample.Payload))
}
}
Output: temp: 21.5
func (*WaitSet) Attach ¶ added in v0.10.0
func (ws *WaitSet) Attach(subs ...Subscriber) *WaitSet
Attach adds subs to the WaitSet. Changes take effect on the next Wait call; an in-progress Wait sees the snapshot taken at its start.
func (*WaitSet) Detach ¶ added in v0.10.0
func (ws *WaitSet) Detach(subs ...Subscriber) *WaitSet
Detach removes subs from the WaitSet. Changes take effect on the next Wait call; an in-progress Wait sees the snapshot taken at its start.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin provides an HTTP administration API for a go-DDS participant (Milestone 10 — Enterprise Services: Administration).
|
Package admin provides an HTTP administration API for a go-DDS participant (Milestone 10 — Enterprise Services: Administration). |
|
Package auto provides automatic DDS transport selection.
|
Package auto provides automatic DDS transport selection. |
|
bridge
|
|
|
domain
Package domain provides a Bridge that forwards DDS samples between two Participant domains (Milestone 10 — Enterprise Services: Routing).
|
Package domain provides a Bridge that forwards DDS samples between two Participant domains (Milestone 10 — Enterprise Services: Routing). |
|
grpc
Package grpcbridge provides a gRPC gateway that bridges a DDS participant to gRPC clients using JSON encoding.
|
Package grpcbridge provides a gRPC gateway that bridges a DDS participant to gRPC clients using JSON encoding. |
|
mqtt
Package mqtt provides a bidirectional bridge between a DDS participant and an MQTT broker.
|
Package mqtt provides a bidirectional bridge between a DDS participant and an MQTT broker. |
|
rest
Package rest provides an HTTP/SSE gateway that bridges a DDS participant to HTTP clients.
|
Package rest provides an HTTP/SSE gateway that bridges a DDS participant to HTTP clients. |
|
wan
Package wan provides a WAN Bridge that forwards DDS samples between two Participant domains over a TCP connection (Milestone 10 — Routing: WAN bridge).
|
Package wan provides a WAN Bridge that forwards DDS samples between two Participant domains over a TCP connection (Milestone 10 — Routing: WAN bridge). |
|
Package cdr implements CDR/XCDR1 (Common Data Representation) encoding and decoding as specified by the OMG DDS-XTypes 1.3 standard.
|
Package cdr implements CDR/XCDR1 (Common Data Representation) encoding and decoding as specified by the OMG DDS-XTypes 1.3 standard. |
|
cmd
|
|
|
ddstool
command
Command ddstool is a command-line interface for DDS publish/subscribe operations, participant diagnostics, and IDL code generation.
|
Command ddstool is a command-line interface for DDS publish/subscribe operations, participant diagnostics, and IDL code generation. |
|
go-dds
command
Command go-dds is the RELAY-conformant CLI for the go-DDS library.
|
Command go-dds is the RELAY-conformant CLI for the go-DDS library. |
|
latmon
command
|
|
|
monitor
command
Command monitor starts a real-time web dashboard for a DDS domain.
|
Command monitor starts a real-time web dashboard for a DDS domain. |
|
Package config provides JSON-based configuration for DDS participants.
|
Package config provides JSON-based configuration for DDS participants. |
|
Package cyclone provides a CycloneDDS-backed implementation of the dds interfaces via CGo.
|
Package cyclone provides a CycloneDDS-backed implementation of the dds interfaces via CGo. |
|
examples
|
|
|
auto-transport
command
Command auto-transport demonstrates the auto transport selector.
|
Command auto-transport demonstrates the auto transport selector. |
|
command-response
command
command-response demonstrates the OMG DDS-RPC request-reply pattern using rpc.Requester and rpc.Replier built on two DDS topics.
|
command-response demonstrates the OMG DDS-RPC request-reply pattern using rpc.Requester and rpc.Replier built on two DDS topics. |
|
loaned-samples
command
Command loaned-samples demonstrates zero-copy publishing with LoaningPublisher.
|
Command loaned-samples demonstrates zero-copy publishing with LoaningPublisher. |
|
otel-tracing
command
Command otel-tracing demonstrates the OpenTelemetry adapter for go-DDS.
|
Command otel-tracing demonstrates the OpenTelemetry adapter for go-DDS. |
|
quickstart/pub
command
Command pub publishes sensor readings on DDS topic "sensors/temperature".
|
Command pub publishes sensor readings on DDS topic "sensors/temperature". |
|
quickstart/sub
command
Command sub subscribes to DDS topic "sensors/temperature" and logs samples.
|
Command sub subscribes to DDS topic "sensors/temperature" and logs samples. |
|
secure-topic
command
secure-topic demonstrates end-to-end payload protection using the security package.
|
secure-topic demonstrates end-to-end payload protection using the security package. |
|
sensor-pipeline
command
sensor-pipeline demonstrates periodic publishing and aggregating subscription using TypedPublisher/TypedSubscriber with the JSON codec.
|
sensor-pipeline demonstrates periodic publishing and aggregating subscription using TypedPublisher/TypedSubscriber with the JSON codec. |
|
taprio-stream
command
taprio-stream demonstrates how to configure a TSN stream for bounded-latency DDS publishing using tsn.StreamConfig and tsn.TAPRIOConfig.
|
taprio-stream demonstrates how to configure a TSN stream for bounded-latency DDS publishing using tsn.StreamConfig and tsn.TAPRIOConfig. |
|
Package idl provides an OMG IDL parser and Go source code generator for go-DDS (Milestone M2 — Developer Experience).
|
Package idl provides an OMG IDL parser and Go source code generator for go-DDS (Milestone M2 — Developer Experience). |
|
Package interop contains RTPS wire-compatibility tests that require a live CycloneDDS peer.
|
Package interop contains RTPS wire-compatibility tests that require a live CycloneDDS peer. |
|
Package mock provides an in-process, CGo-free implementation of the dds interfaces.
|
Package mock provides an in-process, CGo-free implementation of the dds interfaces. |
|
Package monitor provides a real-time web dashboard for a DDS participant.
|
Package monitor provides a real-time web dashboard for a DDS participant. |
|
Package otel bridges the dds.Tracer interface to an OpenTelemetry TracerProvider.
|
Package otel bridges the dds.Tracer interface to an OpenTelemetry TracerProvider. |
|
Package pool provides allocation-efficient data structures for high-throughput DDS workloads on embedded and edge hardware.
|
Package pool provides allocation-efficient data structures for high-throughput DDS workloads on embedded and edge hardware. |
|
Package record provides topic recording, deterministic replay, and fault injection for go-DDS applications.
|
Package record provides topic recording, deterministic replay, and fault injection for go-DDS applications. |
|
Package rpc implements OMG DDS-RPC style request-reply over a DDS participant.
|
Package rpc implements OMG DDS-RPC style request-reply over a DDS participant. |
|
Package rtps provides a pure-Go RTPS/UDP implementation of the dds interfaces.
|
Package rtps provides a pure-Go RTPS/UDP implementation of the dds interfaces. |
|
Package safety provides end-to-end data protection and deterministic queuing primitives for safety-oriented DDS deployments.
|
Package safety provides end-to-end data protection and deterministic queuing primitives for safety-oriented DDS deployments. |
|
Package security provides pluggable transport-security for go-DDS.
|
Package security provides pluggable transport-security for go-DDS. |
|
Package services provides long-running operational service wrappers for go-DDS (Milestone 10 — Enterprise Services: Service Framework).
|
Package services provides long-running operational service wrappers for go-DDS (Milestone 10 — Enterprise Services: Service Framework). |
|
Package shmem provides a cross-process shared-memory transport for same-host DDS communication.
|
Package shmem provides a cross-process shared-memory transport for same-host DDS communication. |
|
Package testutil provides test-harness helpers for DDS participants.
|
Package testutil provides test-harness helpers for DDS participants. |
|
scenario
Package scenario provides a declarative scenario DSL for DDS integration tests.
|
Package scenario provides a declarative scenario DSL for DDS integration tests. |
|
Package tsn provides Time-Sensitive Networking stream descriptors and configuration utilities following the OMG DDS-TSN specification.
|
Package tsn provides Time-Sensitive Networking stream descriptors and configuration utilities following the OMG DDS-TSN specification. |
|
Package xtypes implements Dynamic Data for go-DDS (Milestone 9).
|
Package xtypes implements Dynamic Data for go-DDS (Milestone 9). |