Documentation
¶
Overview ¶
package message defines the terminology required for sharing data between multiple PATH instances.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NATSMetricsReporter ¶
type NATSMetricsReporter struct{}
NATSMetricsReporter provides the functionality required for exporting PATH metrics to NATS messaging platform.
func (*NATSMetricsReporter) Publish ¶
func (nmr *NATSMetricsReporter) Publish(_ *observation.RequestResponseObservations)
Publish exports the details of the service request and response(s) to NATS messaging system. Any entity interested in this data, e.g. the data pipeline for PATH once it is built, should subscribe to NATS to receive the exported data. Implements the gateway.RequestResponseReporter interface.
type ObservationSet ¶
type ObservationSet interface {
// MarshalJSON returns the serialized form of the observations in JSON format.
// This is required for sharing QoS data between multiple PATH instances.
MarshalJSON() ([]byte, error)
// Broadcast is used to communicate the observations contained
// in the set to the interested entities.
// e.g. The observation set returned by a gateway.ServiceRequestContext can
// guide the target service's QoS instance to update the quality data of
// one or more endpoints.
Broadcast() error
}
ObservationSet defines the functionality required for sharing data between PATH instances. e.g. QoS instances can share data by supplying an implementation of this interface.
type Unmarshaller ¶
type Unmarshaller interface {
// UnmarshalJSONObservationSet constructs an observation set by parsing
// its JSON-formatted serialized form.
UnmarshalJSONObservationSet([]byte) (ObservationSet, error)
}
TODO_MVP(@adshmh): consider using protobuf. Unmarshaller builds an instance of the ObservationSet, matching a specific implementation, e.g. one provided by a service QoS. Each service's QoS instance provides its own unique unmarshaller. This allows sharing data between PATH instances.
Directories
¶
| Path | Synopsis |
|---|---|
|
package qos provides the functionality required for messaging (seriliaizing, sharing, etc...) QoS data between multiple PATH instances.
|
package qos provides the functionality required for messaging (seriliaizing, sharing, etc...) QoS data between multiple PATH instances. |