route

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirectGateUnreachable = agentproxy.CodeDirectConnect
	DirectGateIdentity    = agentproxy.CodeDirectIdentityMismatch
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectGate

type DirectGate struct {
	// contains filtered or unexported fields
}

func NewDirectGate

func NewDirectGate(opts DirectGateOptions) *DirectGate

func (*DirectGate) ApplyProbeResult

func (g *DirectGate) ApplyProbeResult(result protocol.DirectProbeResult)

func (*DirectGate) BindProbeTarget

func (g *DirectGate) BindProbeTarget(target protocol.DirectProbeTarget)

func (*DirectGate) Decision

func (g *DirectGate) Decision(targetAgentID, addressFingerprint string) string

func (*DirectGate) EntryCount

func (g *DirectGate) EntryCount() int

func (*DirectGate) MarkChecking

func (g *DirectGate) MarkChecking(targetAgentID, addressFingerprint string)

type DirectGateOptions

type DirectGateOptions struct {
	FreshFor   time.Duration
	MaxEntries int
	Now        func() time.Time
}

type Notifier

type Notifier interface {
	Notify(method string, params any) error
}

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

func NewObserver

func NewObserver(opts ObserverOptions) (*Observer, error)

func (*Observer) Digest

func (o *Observer) Digest() protocol.RouteEdgeDigest

func (*Observer) Dropped

func (o *Observer) Dropped() uint64

func (*Observer) Events

func (o *Observer) Events() <-chan protocol.RouteEvent

func (*Observer) Generation

func (o *Observer) Generation() uint64

func (*Observer) Record

func (o *Observer) Record(event protocol.RouteEvent)

type ObserverOptions

type ObserverOptions struct {
	Generation    uint64
	MaxEdges      int
	QueueSize     int
	EdgeTTL       time.Duration
	SuccessWindow time.Duration
	Now           func() time.Time
	Metrics       TelemetryDropCounter
}

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

func NewReporter

func NewReporter(observer *Observer, opts ReporterOptions) *Reporter

func (*Reporter) Run

func (r *Reporter) Run(ctx context.Context) error

func (*Reporter) SendFailures

func (r *Reporter) SendFailures() uint64

func (*Reporter) SetClient

func (r *Reporter) SetClient(client Notifier)

type ReporterOptions

type ReporterOptions struct {
	DigestInterval time.Duration
}

type TelemetryDropCounter

type TelemetryDropCounter interface {
	IncRouteTelemetryDropped()
}

Jump to

Keyboard shortcuts

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