Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = func( ctx context.Context, ) ProtocolSpecificConfig { return ProtocolSpecificConfig{ IsTLS: false, WriteQueueSize: 1024, WriteTimeout: 10 * time.Second, ReadTimeout: 10 * time.Second, ServerCert: nil, ServerKey: nil, } }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProtocolSpecificConfig `yaml:"config"` Type streamtypes.ServerType `yaml:"protocol"` ListenAddr string `yaml:"listen"` }
type GetPortServerser ¶
type OptionIsTLS ¶
type OptionIsTLS bool
type OptionReadTimeout ¶
type OptionServerCert ¶
type OptionServerCert struct{ *x509.Certificate }
type OptionServerKey ¶
type OptionServerKey struct{ crypto.PrivateKey }
type OptionWriteQueueSize ¶
type OptionWriteQueueSize uint64
type OptionWriteTimeout ¶
type Options ¶
type Options []Option
func (Options) ProtocolSpecificConfig ¶
func (s Options) ProtocolSpecificConfig( ctx context.Context, ) ProtocolSpecificConfig
type ProtocolSpecificConfig ¶
type ProtocolSpecificConfig struct { IsTLS bool WriteQueueSize uint64 WriteTimeout time.Duration ReadTimeout time.Duration ServerCert *x509.Certificate ServerKey crypto.PrivateKey }
func (ProtocolSpecificConfig) Options ¶
func (cfg ProtocolSpecificConfig) Options() Options
type Server ¶
type Server interface { io.Closer ProtocolSpecificConfig() ProtocolSpecificConfig Type() streamtypes.ServerType ListenAddr() string NumBytesConsumerWrote() uint64 NumBytesProducerRead() uint64 }
Click to show internal directories.
Click to hide internal directories.