Help us shape the future of Go! Take the 2026 Go Developer Survey

trafficcontrol

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionEvent added in v1.14.0

type ConnectionEvent struct {
	Type     ConnectionEventType
	ID       uuid.UUID
	Metadata *TrackerMetadata
	ClosedAt time.Time
}

type ConnectionEventType added in v1.14.0

type ConnectionEventType int
const (
	ConnectionEventNew ConnectionEventType = iota
	ConnectionEventClosed
)

type Manager

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

func NewManager

func NewManager(outbound adapter.OutboundManager) *Manager

func (*Manager) Clear added in v1.14.0

func (m *Manager) Clear()

func (*Manager) CloseAllConnections added in v1.14.0

func (m *Manager) CloseAllConnections()

func (*Manager) ClosedConnections added in v1.14.0

func (m *Manager) ClosedConnections() []*TrackerMetadata

func (*Manager) Connection added in v1.14.0

func (m *Manager) Connection(id uuid.UUID) Tracker

func (*Manager) Connections added in v1.14.0

func (m *Manager) Connections() []*TrackerMetadata

func (*Manager) ConnectionsLen added in v1.14.0

func (m *Manager) ConnectionsLen() int

func (*Manager) Name added in v1.14.0

func (m *Manager) Name() string

func (*Manager) RoutedConnection added in v1.14.0

func (m *Manager) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, matchedRule adapter.Rule, matchOutbound adapter.Outbound) net.Conn

func (*Manager) RoutedFlow added in v1.14.0

func (m *Manager) RoutedFlow(ctx context.Context, metadata adapter.InboundContext, matchedRule adapter.Rule, matchOutbound adapter.Outbound) tun.FlowTracker

func (*Manager) RoutedPacketConnection added in v1.14.0

func (m *Manager) RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, matchedRule adapter.Rule, matchOutbound adapter.Outbound) N.PacketConn

func (*Manager) Start added in v1.14.0

func (m *Manager) Start(stage adapter.StartStage, scope *adapter.Scope) error

func (*Manager) SubscribeEvents added in v1.14.0

func (m *Manager) SubscribeEvents() (observable.Subscription[ConnectionEvent], <-chan struct{}, error)

func (*Manager) Total added in v1.14.0

func (m *Manager) Total() (uplinkTotal int64, downlinkTotal int64)

func (*Manager) UnSubscribeEvents added in v1.14.0

func (m *Manager) UnSubscribeEvents(subscription observable.Subscription[ConnectionEvent])

type Tracker added in v1.14.0

type Tracker interface {
	Metadata() *TrackerMetadata
	Close() error
}

type TrackerMetadata added in v1.14.0

type TrackerMetadata struct {
	ID           uuid.UUID
	Metadata     adapter.InboundContext
	CreatedAt    time.Time
	ClosedAt     time.Time
	Upload       *atomic.Int64
	Download     *atomic.Int64
	Chain        []string
	Rule         adapter.Rule
	Outbound     string
	OutboundType string
}

Jump to

Keyboard shortcuts

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