connection

package
v0.0.1-20220726-0003 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// Connection params
	IsSecure string `yaml:"is_secure" mapstructure:"is_secure" default:"yes"`
	// Scheme -> wss is encrypted connection!
	//Scheme string `yaml:"scheme" mapstructure:"scheme" default:"wss://"`
	Host string `yaml:"host" mapstructure:"host" default:"localhost"`
	// Port -> the default is 30001, it's the SSL one!
	Port uint16 `yaml:"port" mapstructure:"port" default:"30001"`
	//UriPath string `yaml:"uri_path" mapstructure:"uri_path" default:"/"`
	// AcceptCertificate -> Accept Self Signed Certificate, temporarily we will accept... but later we should disable
	// And add specific certificates, which will be embedded in each of the Applications!!! TODO: ADD CUSTOM CERTS IN APP!
	// TODO: disable Accept Cert, and accept only the one embedded or signed by the hostname!!!
	AcceptCertificate string `yaml:"accept_certificate" mapstructure:"accept_certificate" default:"yes"`

	// MaxRetries 0 - means no retries, -1 - means infinite, >0 - means a specific nr of retries:
	// How many times it should retry to connect to same host. It's better to not set to infinite because
	// if you have multiple connections, the infinite param it's better to set on websocket client itself
	MaxRetries int16 `yaml:"max_retries" mapstructure:"max_retries" default:"3"`
	// RetryTimeout -> 5 Seconds by default
	RetryTimeout uint16 `yaml:"retry_timeout" mapstructure:"retry_timeout" default:"5"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL