Documentation
¶
Overview ¶
package telemetry owns optional native client collection and delivery. commands and publication owners supply generated contract values; transports only update bounded memory through callbacks. no server runtime depends on this owner.
Index ¶
- Constants
- func Command(payload api.CommandOutcome) api.Event
- func Demo() api.Event
- func Integration(payload api.IntegrationOutcome) api.Event
- func Path(transport tunnel.Transport) api.Path
- func Ready(payload api.PublicationReady) api.Event
- type Collector
- type Config
- type Scope
- func (s *Scope) Close()
- func (s *Scope) Connectivity(options peer.ConnectivityOptions) peer.ConnectivityOptions
- func (s *Scope) Demo()
- func (s *Scope) Integration(payload api.IntegrationOutcome)
- func (s *Scope) Ready(payload api.PublicationReady)
- func (s *Scope) Record(operation api.Operation, path api.Path, outcome api.Outcome, ...)
- func (s *Scope) RelayAttempt(ctx context.Context, transport tunnel.Transport, elapsed time.Duration, ...)
Constants ¶
const ReceiverURL = "https://tnl.dev/api/telemetry"
const RequestTimeout = 500 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
func Command ¶
func Command(payload api.CommandOutcome) api.Event
event constructors use generated payloads directly. validation remains at the queue and receiver boundaries, rather than maintaining another payload model.
func Integration ¶
func Integration(payload api.IntegrationOutcome) api.Event
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
collector owns one queue writer/sender and one preference watcher. observations never wait for disk or network; close cancels and joins both workers.
func (*Collector) BeginScope ¶
func (c *Collector) BeginScope(role api.TransportReportRole) *Scope
type Config ¶
type Config struct {
Root string
Protection clientstate.ProtectionMode
Client *http.Client
Metadata *api.Client
Endpoint string
Interval time.Duration
}
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
each publication owns its scope and closes it after its transport workers. only fixed-size counters are touched by transport and recovery callbacks.
func (*Scope) Connectivity ¶
func (s *Scope) Connectivity(options peer.ConnectivityOptions) peer.ConnectivityOptions
func (*Scope) Demo ¶
func (s *Scope) Demo()
request callbacks only retain bounded facts; the collector encodes them.
func (*Scope) Integration ¶
func (s *Scope) Integration(payload api.IntegrationOutcome)
func (*Scope) Ready ¶
func (s *Scope) Ready(payload api.PublicationReady)