Documentation ¶
Index ¶
- Constants
- Variables
- func BindFlags(flagSet *pflag.FlagSet, container container.Container) error
- func New(config *Config, informer logger.Informer) (net.Conn, error)
- func NewTCP(config *Config, informer logger.Informer) (*net.TCPConn, error)
- func NewUDP(config *Config, informer logger.Informer) (*net.UDPConn, error)
- func NewWithConfigurator(config *Config, configurator configurator.Configurator, ...) (net.Conn, error)
- type Config
Constants ¶
View Source
const ( ProtocolFieldName = "client.socket.protocol" HostFieldName = "client.socket.host" PortFieldName = "client.socket.port" KeepAlivePeriodFiledName = "client.socket.keep_alive_period" DSNFieldName = "client.socket.dsn" ProtocolTCP = "tcp" ProtocolUDP = "udp" ProtocolDefault = ProtocolTCP HostDefault = "127.0.0.1" PortDefault = uint16(8081) )
Variables ¶
View Source
var Component = &app.Component{ Dependencies: app.Components{ logger.Component, configurator.Component, }, Constructor: app.Constructor(func(container container.Container) error { return container.Provides( NewConfig, NewWithConfigurator, ) }), BindFlags: app.BindFlags(BindFlags), }
View Source
var (
DSNDefault = fmt.Sprintf("%s:%d", HostDefault, PortDefault)
)
Functions ¶
func NewWithConfigurator ¶
func NewWithConfigurator( config *Config, configurator configurator.Configurator, informer logger.Informer, ) (net.Conn, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.