Documentation
¶
Index ¶
- func Context(ctx context.Context, inboundRegistry adapter.InboundRegistry, ...) context.Context
- func DNSTransportRegistry() *dns.TransportRegistry
- func EndpointRegistry() *endpoint.Registry
- func InboundRegistry() *inbound.Registry
- func NewDefaultFactory(ctx context.Context, formatter log.Formatter, writer io.Writer, ...) log.ObservableFactory
- func NewFactory(options log.Options) (log.Factory, error)
- func OutboundRegistry() *outbound.Registry
- func ServiceRegistry() *service.Registry
- type Box
- func (s *Box) Close() error
- func (s *Box) ConnTracker() *ConnTracker
- func (s *Box) Endpoint() adapter.EndpointManager
- func (s *Box) Inbound() adapter.InboundManager
- func (s *Box) Network() adapter.NetworkManager
- func (s *Box) Outbound() adapter.OutboundManager
- func (s *Box) PreStart() error
- func (s *Box) Router() adapter.Router
- func (s *Box) Start() error
- func (s *Box) StatsTracker() *StatsTracker
- func (s *Box) Uptime() uint32
- type ConnTracker
- func (c *ConnTracker) CloseConnByInbound(inbound string) int
- func (c *ConnTracker) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) net.Conn
- func (c *ConnTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, ...) network.PacketConn
- type ConnectionInfo
- type Core
- func (c *Core) AddEndpoint(config []byte) error
- func (c *Core) AddInbound(config []byte) error
- func (c *Core) AddOutbound(config []byte) error
- func (c *Core) AddService(config []byte) error
- func (c *Core) GetCtx() context.Context
- func (c *Core) GetInstance() *Box
- func (c *Core) IsRunning() bool
- func (c *Core) RemoveEndpoint(tag string) error
- func (c *Core) RemoveInbound(tag string) error
- func (c *Core) RemoveOutbound(tag string) error
- func (c *Core) RemoveService(tag string) error
- func (c *Core) Start(sbConfig []byte) error
- func (c *Core) Stop() error
- type Counter
- type Options
- type PlatformWriter
- type StatsTracker
- func (c *StatsTracker) GetStats() *[]model.Stats
- func (c *StatsTracker) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) net.Conn
- func (c *StatsTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, ...) network.PacketConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Context ¶
func Context( ctx context.Context, inboundRegistry adapter.InboundRegistry, outboundRegistry adapter.OutboundRegistry, endpointRegistry adapter.EndpointRegistry, dnsTransportRegistry adapter.DNSTransportRegistry, serviceRegistry adapter.ServiceRegistry, ) context.Context
func DNSTransportRegistry ¶
func DNSTransportRegistry() *dns.TransportRegistry
func EndpointRegistry ¶
func InboundRegistry ¶
func NewDefaultFactory ¶
func OutboundRegistry ¶
func ServiceRegistry ¶
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
func (*Box) ConnTracker ¶
func (s *Box) ConnTracker() *ConnTracker
func (*Box) Endpoint ¶
func (s *Box) Endpoint() adapter.EndpointManager
func (*Box) Inbound ¶
func (s *Box) Inbound() adapter.InboundManager
func (*Box) Network ¶
func (s *Box) Network() adapter.NetworkManager
func (*Box) Outbound ¶
func (s *Box) Outbound() adapter.OutboundManager
func (*Box) StatsTracker ¶
func (s *Box) StatsTracker() *StatsTracker
type ConnTracker ¶
type ConnTracker struct {
// contains filtered or unexported fields
}
func NewConnTracker ¶
func NewConnTracker() *ConnTracker
func (*ConnTracker) CloseConnByInbound ¶
func (c *ConnTracker) CloseConnByInbound(inbound string) int
func (*ConnTracker) RoutedConnection ¶
func (*ConnTracker) RoutedPacketConnection ¶
func (c *ConnTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, matchedRule adapter.Rule, matchOutbound adapter.Outbound) network.PacketConn
type ConnectionInfo ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) AddEndpoint ¶
func (*Core) AddInbound ¶
func (*Core) AddOutbound ¶
func (*Core) AddService ¶
func (*Core) GetInstance ¶
func (*Core) RemoveEndpoint ¶
func (*Core) RemoveInbound ¶
func (*Core) RemoveOutbound ¶
func (*Core) RemoveService ¶
type PlatformWriter ¶
type PlatformWriter struct{}
func (PlatformWriter) DisableColors ¶
func (p PlatformWriter) DisableColors() bool
func (PlatformWriter) WriteMessage ¶
func (p PlatformWriter) WriteMessage(level log.Level, message string)
type StatsTracker ¶
type StatsTracker struct {
// contains filtered or unexported fields
}
func NewStatsTracker ¶
func NewStatsTracker() *StatsTracker
func (*StatsTracker) GetStats ¶
func (c *StatsTracker) GetStats() *[]model.Stats
func (*StatsTracker) RoutedConnection ¶
func (*StatsTracker) RoutedPacketConnection ¶
func (c *StatsTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, matchedRule adapter.Rule, matchOutbound adapter.Outbound) network.PacketConn
Click to show internal directories.
Click to hide internal directories.