config

package
v0.0.0-...-dd13c3c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadClientConfig

func LoadClientConfig(path string) error

* * Load client config

Types

type ClientConfigTree

type ClientConfigTree struct {
	ClientSystemConfig *ClientSystemConfig `yaml:"system"`
}

Configuration root structure read from the system configuration file

type ClientRestfulApiConfiguration

type ClientRestfulApiConfiguration struct {
	RestfulApiPort    string `yaml:"restfulApiPort"`
	RestfulApiPath    string `yaml:"restfulApiPath"`
	RestfulApiAddress string `yaml:"restfulApiAddress"`
}

type ClientSystemConfig

type ClientSystemConfig struct {
	ClientRestfulApiConfiguration *ClientRestfulApiConfiguration `yaml:"clientRestfulApiConfiguration"`
	DefaultSessionConfiguration   *DefaultSessionConfiguration   `yaml:"defaultSessionConfiguration"`
	NonConfirmableMessageTask     *MessageTaskConfiguration      `yaml:"nonConfirmableMessageTask"`
	ConfirmableMessageTask        *MessageTaskConfiguration      `yaml:"confirmableMessageTask"`
	SecureFile                    *SecureFile                    `yaml:"secureFile"`
	IntervalBeforeMaxAge          int                            `yaml:"intervalBeforeMaxAge"`
	InitialRequestBlockSize       *int                           `yaml:"initialRequestBlockSize"`
	SecondRequestBlockSize        *int                           `yaml:"secondRequestBlockSize"`
	PinnedCertificate             *PinnedCertificate             `yaml:"pinnedCertificate"`
	QBlockOption                  *QBlockOption                  `yaml:"qBlockOption"`
}

System global configuration container

func GetSystemConfig

func GetSystemConfig() *ClientSystemConfig

* * Get system config

func (*ClientSystemConfig) String

func (config *ClientSystemConfig) String() (result string)

Convert config to String

type DefaultSessionConfiguration

type DefaultSessionConfiguration struct {
	HeartbeatInterval int     `yaml:"heartbeatInterval"`
	MissingHbAllowed  int     `yaml:"missingHbAllowed"`
	MaxRetransmit     int     `yaml:"maxRetransmit"`
	AckTimeout        float64 `yaml:"ackTimeout"`
	AckRandomFactor   float64 `yaml:"ackRandomFactor"`
}

type MessageTaskConfiguration

type MessageTaskConfiguration struct {
	TaskInterval    int `yaml:"taskInterval"`
	TaskRetryNumber int `yaml:"taskRetryNumber"`
	TaskTimeout     int `yaml:"taskTimeout"`
}

type PinnedCertificate

type PinnedCertificate struct {
	ReferenceIdentifier   string `yaml:"referenceIdentifier"`
	PresentIdentifierList string `yaml:"presentIdentifierList"`
}

type QBlockOption

type QBlockOption struct {
	QBlockSize        int     `yaml:"qBlockSize"`
	MaxPayloads       int     `yaml:"maxPayloads"`
	NonMaxRetransmit  int     `yaml:"nonMaxRetransmit"`
	NonTimeout        float64 `yaml:"nonTimeout"`
	NonReceiveTimeout float64 `yaml:"nonReceiveTimeout"`
}

type SecureFile

type SecureFile struct {
	ClientCertFile string `yaml:"clientCertFile"`
	ClientKeyFile  string `yaml:"clientKeyFile"`
	CertFile       string `yaml:"certFile"`
}

Jump to

Keyboard shortcuts

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