TCPTransportConfig is a configuration structure for creating new TCPTransport.
| 38 | |
| 39 | // TCPTransportConfig is a configuration structure for creating new TCPTransport. |
| 40 | type TCPTransportConfig struct { |
| 41 | // BindAddrs is a list of IP addresses to bind to. |
| 42 | BindAddrs flagext.StringSlice `yaml:"bind_addr"` |
| 43 | |
| 44 | // BindPort is the port to listen on, for each address above. |
| 45 | BindPort int `yaml:"bind_port"` |
| 46 | |
| 47 | // Timeout used when making connections to other nodes to send packet. |
| 48 | // Zero = no timeout |
| 49 | PacketDialTimeout time.Duration `yaml:"packet_dial_timeout" category:"advanced"` |
| 50 | |
| 51 | // Timeout for writing packet data. Zero = no timeout. |
| 52 | PacketWriteTimeout time.Duration `yaml:"packet_write_timeout" category:"advanced"` |
| 53 | |
| 54 | // Maximum number of concurrent writes to other nodes. |
| 55 | MaxConcurrentWrites int `yaml:"max_concurrent_writes" category:"advanced"` |
| 56 | |
| 57 | // Timeout for acquiring one of the concurrent write slots. |
| 58 | AcquireWriterTimeout time.Duration `yaml:"acquire_writer_timeout" category:"advanced"` |
| 59 | |
| 60 | // Transport logs lots of messages at debug level, so it deserves an extra flag for turning it on |
| 61 | TransportDebug bool `yaml:"-" category:"advanced"` |
| 62 | |
| 63 | // Where to put custom metrics. nil = don't register. |
| 64 | MetricsNamespace string `yaml:"-"` |
| 65 | |
| 66 | TLSEnabled bool `yaml:"tls_enabled" category:"advanced"` |
| 67 | TLS dstls.ClientConfig `yaml:",inline"` |
| 68 | } |
| 69 | |
| 70 | func (cfg *TCPTransportConfig) RegisterFlags(f *flag.FlagSet) { |
| 71 | cfg.RegisterFlagsWithPrefix(f, "") |
nothing calls this directly
no outgoing calls
no test coverage detected