servercfg

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const EmqxBrokerType = "emqx"

EmqxBrokerType denotes the broker type for EMQX MQTT

Variables

View Source
var (
	Version              = "dev"
	IsPro                = false
	ErrLicenseValidation error
	EmqxCloudDeploy      Emqxdeploy = "cloud"
	EmqxOnPremDeploy     Emqxdeploy = "on-prem"
)

Functions

func AutoUpdateEnabled

func AutoUpdateEnabled() bool

AutoUpdateEnabled returns a boolean indicating whether netclient auto update is enabled or disabled default is enabled

func CacheEnabled added in v0.22.0

func CacheEnabled() bool

CacheEnabled - checks if cache is enabled

func DeployedByOperator

func DeployedByOperator() bool

DeployedByOperator - returns true if the instance is deployed by netmaker operator

func DisableRemoteIPCheck

func DisableRemoteIPCheck() bool

DisableRemoteIPCheck - disable the remote ip check

func GetAPIConnString

func GetAPIConnString() string

GetAPIConnString - gets the api connections string

func GetAPIHost

func GetAPIHost() string

GetAPIHost - gets the api host

func GetAPIPort

func GetAPIPort() string

GetAPIPort - gets the api port

func GetAllowedEmailDomains added in v0.24.0

func GetAllowedEmailDomains() string

GetAllowedEmailDomains - gets the allowed email domains for oauth signup

func GetAllowedOrigin

func GetAllowedOrigin() string

GetAllowedOrigin - get the allowed origin

func GetAuthProviderInfo

func GetAuthProviderInfo() (pi []string)

GetAuthProviderInfo = gets the oauth provider info

func GetAzureTenant

func GetAzureTenant() string

GetAzureTenant - retrieve the azure tenant ID from env variable or config file

func GetBrokerType

func GetBrokerType() string

GetBrokerType - returns the type of MQ broker

func GetClickHouseConfig added in v1.4.0

func GetClickHouseConfig() config.ClickHouseConfig

func GetClickHouseDB added in v1.4.0

func GetClickHouseDB() string

func GetClickHouseHost added in v1.4.0

func GetClickHouseHost() string

func GetClickHousePassword added in v1.4.0

func GetClickHousePassword() string

func GetClickHousePort added in v1.4.0

func GetClickHousePort() int32

func GetClickHouseUser added in v1.4.0

func GetClickHouseUser() string

func GetCoreDNSAddr

func GetCoreDNSAddr() string

GetCoreDNSAddr - gets the core dns address

func GetDB

func GetDB() string

GetDB - gets the database type

func GetDefaultDomain added in v0.26.0

func GetDefaultDomain() string

GetDefaultDomain - get the default domain

func GetEgressLimit

func GetEgressLimit() int

GetEgressLimit - fetches free tier limits on egresses

func GetEmaiSenderPassword added in v0.25.0

func GetEmaiSenderPassword() string

func GetEmqxAppID added in v0.23.0

func GetEmqxAppID() string

GetEmqxAppID - gets the emqx cloud app id

func GetEmqxAppSecret added in v0.23.0

func GetEmqxAppSecret() string

GetEmqxAppSecret - gets the emqx cloud app secret

func GetEmqxRestEndpoint

func GetEmqxRestEndpoint() string

GetEmqxRestEndpoint - returns the REST API Endpoint of EMQX

func GetEnvironment

func GetEnvironment() string

GetEnvironment returns the environment the server is running in (e.g. dev, staging, prod...)

func GetFrontendURL

func GetFrontendURL() string

GetFrontendURL - gets the frontend url

func GetIngressLimit

func GetIngressLimit() int

GetIngressLimit - fetches free tier limits on ingresses

func GetJwtValidityDurationFromEnv added in v0.99.0

func GetJwtValidityDurationFromEnv() int

GetJwtValidityDurationFromEnv - returns the JWT validity duration in seconds

func GetLicenseKey

func GetLicenseKey() string

GetLicenseKey - retrieves pro license value from env or conf files

func GetMachinesLimit

func GetMachinesLimit() int

GetMachinesLimit - fetches free tier limits on machines (clients + hosts)

func GetManageDNS added in v0.26.0

func GetManageDNS() bool

GetManageDNS - if manage DNS enabled or not

func GetMasterKey

func GetMasterKey() string

GetMasterKey - gets the configured master key of server

func GetMessageQueueEndpoint

func GetMessageQueueEndpoint() (string, bool)

GetMessageQueueEndpoint - gets the message queue endpoint

func GetMetricInterval added in v0.24.3

func GetMetricInterval() string

GetMetricInterval - get the publish metric interval

func GetMetricIntervalInMinutes added in v0.90.0

func GetMetricIntervalInMinutes() time.Duration

GetMetricInterval - get the publish metric interval

func GetMetricsPort added in v0.90.0

func GetMetricsPort() int

GetMetricsPort - get metrics port

func GetMqPassword

func GetMqPassword() string

GetMqPassword - fetches the MQ password

func GetMqUserName

func GetMqUserName() string

GetMqUserName - fetches the MQ username

func GetNetmakerTenantID

func GetNetmakerTenantID() string

GetNetmakerTenantID - get's the associated, Netmaker, tenant ID to verify ownership

func GetNetworkLimit

func GetNetworkLimit() int

GetNetworkLimit - fetches free tier limits on networks

func GetNmBaseDomain added in v0.25.0

func GetNmBaseDomain() string

GetNmBaseDomain - fetches nm base domain

func GetNodeID

func GetNodeID() string

GetNodeID - gets the node id

func GetOwnerEmail added in v0.22.0

func GetOwnerEmail() string

GetOwnerEmail - gets the owner email (saas)

func GetPlatform

func GetPlatform() string

GetPlatform - get the system type of server

func GetPublicBrokerEndpoint

func GetPublicBrokerEndpoint() string

GetPublicBrokerEndpoint - returns the public broker endpoint which shall be used by netclient

func GetPublicIP

func GetPublicIP() (string, error)

GetPublicIP - gets public ip

func GetRacRestrictToSingleNetwork added in v0.90.0

func GetRacRestrictToSingleNetwork() bool

GetRacRestrictToSingleNetwork - returns whether the feature to allow simultaneous network connections via RAC is enabled

func GetSQLConf

func GetSQLConf() config.SQLConfig

func GetSQLConn

func GetSQLConn() string

GetSQLConn - get the sql connection string

func GetSQLDB

func GetSQLDB() string

func GetSQLHost

func GetSQLHost() string

func GetSQLPass

func GetSQLPass() string

func GetSQLPort

func GetSQLPort() int32

func GetSQLSSLMode

func GetSQLSSLMode() string

func GetSQLUser

func GetSQLUser() string

func GetSenderEmail added in v0.25.0

func GetSenderEmail() string

func GetSenderUser added in v0.25.0

func GetSenderUser() string

func GetServer

func GetServer() string

GetServer - gets the server name

func GetServerHostIP added in v0.30.0

func GetServerHostIP() string

GetServerHostIP - fetches server IP

func GetSmtpHost added in v0.25.0

func GetSmtpHost() string

func GetSmtpPort added in v0.25.0

func GetSmtpPort() int

func GetStunServers added in v0.30.0

func GetStunServers() string

func GetUserLimit

func GetUserLimit() int

GetUserLimit - fetches free tier limits on users

func GetVerbosity

func GetVerbosity() int32

func GetVersion

func GetVersion() string

GetVersion - version of netmaker

func IsBasicAuthEnabled

func IsBasicAuthEnabled() bool

IsBasicAuthEnabled - checks if basic auth has been configured to be turned off

func IsDNSMode

func IsDNSMode() bool

IsDNSMode - should it run with DNS

func IsDisplayKeys

func IsDisplayKeys() bool

IsDisplayKeys - should server be able to display keys?

func IsEndpointDetectionEnabled added in v0.24.0

func IsEndpointDetectionEnabled() bool

IsEndpointDetectionEnabled - returns true if endpoint detection enabled

func IsMessageQueueBackend

func IsMessageQueueBackend() bool

IsMessageQueueBackend - checks if message queue is on or off

func IsMetricsExporter

func IsMetricsExporter() bool

IsMetricsExporter - checks if metrics exporter is on or off

func IsOldAclEnabled added in v0.30.0

func IsOldAclEnabled() bool

func IsRestBackend

func IsRestBackend() bool

IsRestBackend - checks if rest is on or off

func IsStunEnabled added in v0.30.0

func IsStunEnabled() bool

IsStunEnabled - returns true if STUN set to on

func SetHost

func SetHost() error

SetHost - sets the host ip

func SetNodeID

func SetNodeID(id string)

func SetVersion

func SetVersion(v string)

SetVersion - set version of netmaker

func Telemetry

func Telemetry() string

Telemetry - checks if telemetry data should be sent

Types

type Emqxdeploy added in v0.23.0

type Emqxdeploy string

Emqxdeploy - emqx deploy type

func GetEmqxDeployType added in v0.23.0

func GetEmqxDeployType() (deployType Emqxdeploy)

GetEmqxDeployType - fetches emqx deploy type this server uses

Jump to

Keyboard shortcuts

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