servercfg

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 9 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 GetCoreDNSAddr

func GetCoreDNSAddr() string

GetCoreDNSAddr - gets the core dns address

func GetDB

func GetDB() string

GetDB - gets the database type

func GetEgressLimit

func GetEgressLimit() int

GetEgressLimit - fetches free tier limits on egresses

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 GetJwtValidityDuration

func GetJwtValidityDuration() time.Duration

GetJwtValidityDuration - 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 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 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 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 GetRacAutoDisable

func GetRacAutoDisable() bool

GetRacAutoDisable - returns whether the feature to autodisable 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 GetServer

func GetServer() string

GetServer - gets the server name

func GetServerConfig

func GetServerConfig() config.ServerConfig

GetServerConfig - gets the server config into memory from file or env

func GetServerInfo

func GetServerInfo() models.ServerConfig

GetServerInfo - gets the server config into memory from file or env

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 IsRestBackend

func IsRestBackend() bool

IsRestBackend - checks if rest is on or off

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