Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // TransportTCPTCP is the transport name for plain TCP TransportTCPTCP = "tcp" // TransportTCPTLS is the transport name for encrypted TLS TransportTCPTLS = "tls" )
Functions ¶
func NewTransportTCPFactory ¶
func NewTransportTCPFactory(config *config.Config, configPath string, unUsed map[string]interface{}, name string) (interface{}, error)
NewTransportTCPFactory create a new TransportTCPFactory from the provided configuration data, reporting back any configuration errors it discovers.
Types ¶
type TransportTCP ¶
type TransportTCP struct {
// contains filtered or unexported fields
}
TransportTCP implements a transport that sends over TCP It also can optionally introduce a TLS layer for security
func (*TransportTCP) ReloadConfig ¶
func (t *TransportTCP) ReloadConfig(factoryInterface interface{}, finishOnFail bool) bool
ReloadConfig returns true if the transport needs to be restarted in order for the new configuration to apply
func (*TransportTCP) Write ¶
func (t *TransportTCP) Write(nonce string, events []*core.EventDescriptor) error
Write a message to the transport
type TransportTCPFactory ¶
type TransportTCPFactory struct { Reconnect time.Duration `config:"reconnect backoff"` ReconnectMax time.Duration `config:"reconnect backoff max"` SSLCertificate string `config:"ssl certificate"` SSLKey string `config:"ssl key"` SSLCA string `config:"ssl ca"` // contains filtered or unexported fields }
TransportTCPFactory holds the configuration from the configuration file It allows creation of TransportTCP instances that use this configuration
func (*TransportTCPFactory) InitDefaults ¶
func (f *TransportTCPFactory) InitDefaults()
InitDefaults sets the default configuration values
func (*TransportTCPFactory) NewTransport ¶
func (f *TransportTCPFactory) NewTransport(observer transports.Observer, finishOnFail bool) transports.Transport
NewTransport returns a new Transport interface using the settings from the TransportTCPFactory.