config

package
v0.0.0-...-edd4e79 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPubMaxQos

func GetPubMaxQos() uint8

func GetRootContext

func GetRootContext() context.Context

Types

type Broker

type Broker struct {
	ConnectAckProperty
}

type Config

type Config struct {
	Retry
	TimeWheel
	Tree
}

func (Config) GetTree

func (c Config) GetTree() Tree

type ConnectAckProperty

type ConnectAckProperty struct {
	SessionExpired                  string `json:"session_expired"`
	ReceiveMaximum                  int    `json:"receive_maximum"`
	MaxQos                          int    `json:"max_qos"`
	RetainAvailable                 bool   `json:"retain_available"`
	MaximumPacketSize               int    `json:"maximum_packet_size"`
	TopicAliasMaximum               int    `json:"topic_alias_maximum"`
	WildcardSubscriptionAvailable   bool   `json:"wildcard_subscription_available"`
	SubscriptionIdentifierAvailable bool   `json:"subscription_identifier_available"`
	SharedSubscriptionAvailable     bool   `json:"shared_subscription_available"`
	ServerKeepAlive                 int    `json:"server_keep_alive"`
	ResponseInformation             string `json:"response_information"`
	ServerReference                 string `json:"server_reference"`
	AuthenticationMethod            string `json:"authentication_method"`
	AuthenticationData              string `json:"authentication_data"`
}

type Retry

type Retry struct {
	MaxRetryCount int
	MaxTime       time.Duration
	Interval      time.Duration
}

func GetRetry

func GetRetry() Retry

func (Retry) GetInterval

func (r Retry) GetInterval() time.Duration

func (Retry) GetMaxRetryCount

func (r Retry) GetMaxRetryCount() int

func (Retry) GetMaxTime

func (r Retry) GetMaxTime() time.Duration

type Server

type Server struct {
	Port       int
	BrokerPort int
}

func GetServer

func GetServer() Server

func (Server) GetBrokerPort

func (e Server) GetBrokerPort() int

func (Server) GetPort

func (e Server) GetPort() int

type TimeWheel

type TimeWheel struct {
	Interval time.Duration
	SlotNum  int
}

func GetTimeWheel

func GetTimeWheel() TimeWheel

func (TimeWheel) GetInterval

func (t TimeWheel) GetInterval() time.Duration

func (TimeWheel) GetSlotNum

func (t TimeWheel) GetSlotNum() int

type Topic

type Topic struct {
	WindowSize int
}

func GetTopic

func GetTopic() Topic

type Tree

type Tree struct {
	DragonboatConfig config.Config
	NodeHostConfig   config.NodeHostConfig
	InitNode         map[uint64]string
}

func GetTree

func GetTree() Tree

Jump to

Keyboard shortcuts

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