Documentation
¶
Index ¶
- type ConnectionEvent
- type ConnectionEventType
- type Manager
- func (m *Manager) Clear()
- func (m *Manager) Close() error
- func (m *Manager) CloseAllConnections()
- func (m *Manager) ClosedConnections() []*TrackerMetadata
- func (m *Manager) Connection(id uuid.UUID) Tracker
- func (m *Manager) Connections() []*TrackerMetadata
- func (m *Manager) ConnectionsLen() int
- func (m *Manager) Name() string
- func (m *Manager) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) net.Conn
- func (m *Manager) RoutedFlow(ctx context.Context, metadata adapter.InboundContext, matchedRule adapter.Rule, ...) tun.FlowTracker
- func (m *Manager) RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, ...) N.PacketConn
- func (m *Manager) Start(stage adapter.StartStage) error
- func (m *Manager) SubscribeEvents() (observable.Subscription[ConnectionEvent], <-chan struct{}, error)
- func (m *Manager) Total() (uplinkTotal int64, downlinkTotal int64)
- func (m *Manager) UnSubscribeEvents(subscription observable.Subscription[ConnectionEvent])
- type Tracker
- type TrackerMetadata
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) 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) Connections ¶ added in v1.14.0
func (m *Manager) Connections() []*TrackerMetadata
func (*Manager) ConnectionsLen ¶ added in v1.14.0
func (*Manager) RoutedConnection ¶ added in v1.14.0
func (*Manager) RoutedFlow ¶ added in v1.14.0
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) SubscribeEvents ¶ added in v1.14.0
func (m *Manager) SubscribeEvents() (observable.Subscription[ConnectionEvent], <-chan struct{}, error)
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
}
Click to show internal directories.
Click to hide internal directories.