Documentation
¶
Index ¶
- type TelemetryView
- func (v *TelemetryView) ActiveSessions(_ string) (int64, bool)
- func (v *TelemetryView) ClearTunnel(tunnelID string)
- func (v *TelemetryView) DecSessions(tunnelID string)
- func (v *TelemetryView) IncSessions(tunnelID string)
- func (v *TelemetryView) LastHeartbeat(_ string) (time.Time, bool)
- func (v *TelemetryView) ListSites() []string
- func (v *TelemetryView) Online(_ string) (bool, bool)
- func (v *TelemetryView) SessionsByTunnel() map[string]int64
- func (v *TelemetryView) SetOnline(b bool)
- func (v *TelemetryView) TouchHeartbeat()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TelemetryView ¶
type TelemetryView struct {
// contains filtered or unexported fields
}
TelemetryView is a minimal, thread-safe implementation to feed observables. Since one Newt process represents one site, we expose a single logical site. site_id is a resource attribute, so we do not emit per-site labels here.
func (*TelemetryView) ActiveSessions ¶
func (v *TelemetryView) ActiveSessions(_ string) (int64, bool)
func (*TelemetryView) ClearTunnel ¶
func (v *TelemetryView) ClearTunnel(tunnelID string)
func (*TelemetryView) DecSessions ¶
func (v *TelemetryView) DecSessions(tunnelID string)
func (*TelemetryView) IncSessions ¶
func (v *TelemetryView) IncSessions(tunnelID string)
Instrumentation helpers
func (*TelemetryView) LastHeartbeat ¶
func (v *TelemetryView) LastHeartbeat(_ string) (time.Time, bool)
func (*TelemetryView) ListSites ¶
func (v *TelemetryView) ListSites() []string
func (*TelemetryView) SessionsByTunnel ¶
func (v *TelemetryView) SessionsByTunnel() map[string]int64
Extended accessor used by telemetry callback to publish per-tunnel samples.
func (*TelemetryView) SetOnline ¶
func (v *TelemetryView) SetOnline(b bool)
func (*TelemetryView) TouchHeartbeat ¶
func (v *TelemetryView) TouchHeartbeat()
Click to show internal directories.
Click to hide internal directories.