Documentation
¶
Index ¶
- Variables
- type Config
- type CounterReader
- type DNSThenOthersSniffResult
- type DefaultDispatcher
- func (*DefaultDispatcher) Close() error
- func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destination) (*transport.Link, error)
- func (d *DefaultDispatcher) DispatchLink(ctx context.Context, destination net.Destination, outbound *transport.Link) error
- func (d *DefaultDispatcher) Init(config *Config, om outbound.Manager, router routing.Router, pm policy.Manager, ...) error
- func (*DefaultDispatcher) Start() error
- func (*DefaultDispatcher) Type() interface{}
- type LinkManager
- type ManagedWriter
- type SessionConfig
- type SniffResult
- type Sniffer
- type SnifferIsProtoSubsetOf
- type SnifferResultComposite
Constants ¶
This section is empty.
Variables ¶
View Source
var File_core_app_dispatcher_ppnode_dispatcher_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Settings *SessionConfig `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"`
// contains filtered or unexported fields
}
func (*Config) Descriptor
deprecated
func (*Config) GetSettings ¶
func (x *Config) GetSettings() *SessionConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type CounterReader ¶
type CounterReader struct {
Reader buf.TimeoutReader
Counter *atomic.Int64
}
func (*CounterReader) ReadMultiBuffer ¶
func (c *CounterReader) ReadMultiBuffer() (buf.MultiBuffer, error)
func (*CounterReader) ReadMultiBufferTimeout ¶
func (c *CounterReader) ReadMultiBufferTimeout(time.Duration) (buf.MultiBuffer, error)
type DNSThenOthersSniffResult ¶
type DNSThenOthersSniffResult struct {
// contains filtered or unexported fields
}
func (DNSThenOthersSniffResult) Domain ¶
func (f DNSThenOthersSniffResult) Domain() string
func (DNSThenOthersSniffResult) IsProtoSubsetOf ¶
func (f DNSThenOthersSniffResult) IsProtoSubsetOf(protocolName string) bool
func (DNSThenOthersSniffResult) Protocol ¶
func (DNSThenOthersSniffResult) Protocol() string
type DefaultDispatcher ¶
type DefaultDispatcher struct {
Counter sync.Map
LinkManagers sync.Map // map[string]*LinkManager
// contains filtered or unexported fields
}
DefaultDispatcher is a default implementation of Dispatcher.
func (*DefaultDispatcher) Close ¶
func (*DefaultDispatcher) Close() error
Close implements common.Closable.
func (*DefaultDispatcher) Dispatch ¶
func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destination) (*transport.Link, error)
Dispatch implements routing.Dispatcher.
func (*DefaultDispatcher) DispatchLink ¶
func (d *DefaultDispatcher) DispatchLink(ctx context.Context, destination net.Destination, outbound *transport.Link) error
DispatchLink implements routing.Dispatcher.
func (*DefaultDispatcher) Init ¶
func (d *DefaultDispatcher) Init(config *Config, om outbound.Manager, router routing.Router, pm policy.Manager, sm stats.Manager) error
Init initializes DefaultDispatcher.
func (*DefaultDispatcher) Start ¶
func (*DefaultDispatcher) Start() error
Start implements common.Runnable.
func (*DefaultDispatcher) Type ¶
func (*DefaultDispatcher) Type() interface{}
Type implements common.HasType.
type LinkManager ¶
type LinkManager struct {
// contains filtered or unexported fields
}
func (*LinkManager) AddLink ¶
func (m *LinkManager) AddLink(writer *ManagedWriter, reader buf.Reader)
func (*LinkManager) CloseAll ¶
func (m *LinkManager) CloseAll()
func (*LinkManager) RemoveWriter ¶
func (m *LinkManager) RemoveWriter(writer *ManagedWriter)
type ManagedWriter ¶
type ManagedWriter struct {
// contains filtered or unexported fields
}
func (*ManagedWriter) Close ¶
func (w *ManagedWriter) Close() error
func (*ManagedWriter) WriteMultiBuffer ¶
func (w *ManagedWriter) WriteMultiBuffer(mb buf.MultiBuffer) error
type SessionConfig ¶
type SessionConfig struct {
// contains filtered or unexported fields
}
func (*SessionConfig) Descriptor
deprecated
func (*SessionConfig) Descriptor() ([]byte, []int)
Deprecated: Use SessionConfig.ProtoReflect.Descriptor instead.
func (*SessionConfig) ProtoMessage ¶
func (*SessionConfig) ProtoMessage()
func (*SessionConfig) ProtoReflect ¶
func (x *SessionConfig) ProtoReflect() protoreflect.Message
func (*SessionConfig) Reset ¶
func (x *SessionConfig) Reset()
func (*SessionConfig) String ¶
func (x *SessionConfig) String() string
type SniffResult ¶
func CompositeResult ¶
func CompositeResult(domainResult SniffResult, protocolResult SniffResult) SniffResult
type Sniffer ¶
type Sniffer struct {
// contains filtered or unexported fields
}
func NewSniffer ¶
func (*Sniffer) SniffMetadata ¶
func (s *Sniffer) SniffMetadata(c context.Context) (SniffResult, error)
type SnifferIsProtoSubsetOf ¶
type SnifferResultComposite ¶
type SnifferResultComposite interface {
ProtocolForDomainResult() string
}
Click to show internal directories.
Click to hide internal directories.