config

package
v0.0.1-20220723-0002 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Enable the broker...
	IsEnabled string `yaml:"is_enabled" mapstructure:"is_enabled" default:"no"`

	//----------RELATED TO BROKER---------\\
	PipeName  string `yaml:"pipe_name" mapstructure:"pipe_name" default:"default"` // This is the pipe Name where it connects (or the URI)
	AuthToken string `yaml:"auth_token" mapstructure:"auth_token" default:"default_token"`

	//----------RELATED TO CONNECTIONS---------\\
	// These configurations are taken from websocket! so they should be the same!
	// Hosts -> They are comma separated if there are multiple!
	AutoReconnect string `yaml:"auto_reconnect" mapstructure:"auto_reconnect" default:"yes"`
	Reconnect     ReconnectOptions
	// UseMultipleConnections -> Enable utilization of existing listed connections, if the client cannot connect to previous, will take the next one!
	UseMultipleConnections string `yaml:"use_multiple_connections" mapstructure:"use_multiple_connections" default:"yes"`
	Connections            []*connection.Connection

	// This is the logger configuration!
	Logger loggerConfig.Config
}

type ReconnectOptions

type ReconnectOptions struct {
	// TimeoutSeconds -> 5 Seconds, after disconnect happened, the client will reconnect after
	// indicated time!
	TimeoutSeconds uint16 `yaml:"timeout_seconds" mapstructure:"timeout_seconds" default:"5"`
	// MaxRetries -> -1 -> infinite! Maximum nr of retries....
	MaxRetries int16 `yaml:"max_retries" mapstructure:"max_retries" default:"-1"`
}

Jump to

Keyboard shortcuts

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