base

package
v0.0.1-dev-821937b Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetMajorInterface = "eth0"

	DataCenterHelpUrl = "https://www.bigstack.co/contact-us"
)
View Source
const (
	DataCenters = "datacenters"

	Cloud = "cloud"
	Edge  = "edge"
)

Variables

View Source
var (
	ServiceDiscoveryIdentity string
	DataCenterName           string
	DataCenterVersion        string
	DataCenterNumericVersion string
	DataCenterVip            string
	HostID                   string
	Hostname                 string
	SerialNumber             string
	CurrentRole              string
	ListenIp                 string
	ListenAddr               string
	ListenPort               int
	AdvertiseIp              string
	AdvertiseAddr            string
	AdvertisePort            int
	ManagementNet            string
	ManagementIp             string
	StorageNet               string
	StorageIP                string
	IsHaEnabled              bool
	IsGpuEnabled             bool
	NodeMetadata             map[string]string
)

Functions

func CapturePanic

func CapturePanic()

func GenerateNodeHashByMacAddr

func GenerateNodeHashByMacAddr() (string, error)

func GetMacAddr

func GetMacAddr(netInterface string) (string, error)

Types

type Additional

type Additional struct {
	HelpUrl           string `json:"helpUrl,omitempty" bson:"helpUrl"`
	V1ApiDocUrl       string `json:"v1ApiDoc,omitempty" bson:"v1ApiDoc"`
	NodeLicenseStatus `json:"nodeLicenseStatus" bson:"nodeLicenseStatus"`
}

type DataCenter

type DataCenter struct {
	Type        string   `json:"type" bson:"type"`
	Id          string   `json:"id,omitempty" bson:"id"`
	Name        string   `json:"name" bson:"name"`
	Roles       []string `json:"roles" bson:"roles"`
	Version     string   `json:"version" bson:"version"`
	VirtualIp   string   `json:"virtualIp" bson:"virtualIp"`
	IsLocal     bool     `json:"isLocal" bson:"isLocal"`
	IsHaEnabled bool     `json:"isHaEnabled" bson:"isHaEnabled"`
	UtcTimeZone string   `json:"utcTimeZone,omitempty" bson:"utcTimeZone"`
	Additional  `json:"additional" bson:"additional"`
}

type NodeLicenseStatus

type NodeLicenseStatus struct {
	Valid     int `json:"valid" bson:"valid"`
	Expired   int `json:"expired" bson:"expired"`
	Unlicense int `json:"unlicense" bson:"unlicense"`
}

Jump to

Keyboard shortcuts

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