 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func CapturePanic()
- func CheckTuningSpec(tuning Tuning) error
- func GenNodeAuthHeaders() map[string]string
- func GenNodeToken(hostname string) string
- func GenerateNodeHashByMacAddr() (string, error)
- func GetActiveNodeMap() map[string]Node
- func GetCloudRoles() []string
- func GetEdgeRoles() []string
- func GetEmailRecipients() ([]email.Recipient, error)
- func GetLicenseSearcher() bleve.Index
- func GetLocalTunings() *sync.Map
- func GetMacAddr(interfaceName string) (string, error)
- func GetNodeSearcher() bleve.Index
- func GetRadosGatewayUrl() string
- func GetRegisteredServices() ([]*registry.Service, error)
- func GetSlackChannels() ([]slack.ApiChannel, error)
- func GetSystemSerial(file string) (string, error)
- func GetTuningSearcher() bleve.Index
- func GetTuningSpecs() *sync.Map
- func HealthDB() string
- func HostnameNodeMap() (map[string]Node, error)
- func InitLicenseSearchIndex() error
- func InitNodeSearchIndex() error
- func InitTuningSearchIndex() error
- func IsCloudRole(role string) bool
- func IsEdgeRole(role string) bool
- func IsLocalNode(hostname string) bool
- func NewLicenseSearcher() (bleve.Index, error)
- func RepairCollection() string
- func SetLicenses(licenses []License)
- func SetLocalTuning(tuning Tuning)
- func SetNodeDetails(nodesWithDetails []Node)
- func SetTuningSpec(name string, spec *TuningSpec)
- func SettingsDB() string
- func ShouldIHandleTheTuning(name string) bool
- func SyncRoleNodes()
- func TimPastRFC3339(duration time.Duration) string
- func TimeISO8601Z(t time.Time) string
- func TimeLocal() string
- func TimeLocalISO8601(t time.Time) string
- func TimeLocalRFC3339(t time.Time) string
- func TimeNowRFC3339() string
- func TimeNowRFC3339Z() string
- func TimePastRFC3339Z(duration time.Duration) string
- func TimeRFC3339(duration time.Duration) string
- func TimeRFC3339Z(t time.Time) string
- func TimeUTC(t time.Time) string
- func TitlePrefixCollection() string
- func ToLowerInPlace(ss []string)
- func TuningCollection(name string) string
- func TuningDB() string
- func TuningReqCollection() string
- type Additional
- type BlockDevice
- type BlockDeviceStatus
- type ComputeStatistic
- type Dashboard
- type DataCenter
- type DataCenterUsage
- type Error
- type Expiry
- type Health
- type HealthCheck
- type Host
- type HostNetworkPacket
- type HostPercentageUsage
- type HostUsage
- type Integration
- type Issue
- type Label
- type License
- func (l *License) GenSearchableObject() License
- func (l *License) InitCompromisedStatus()
- func (l *License) InitExpiredStatus()
- func (l *License) InitInvalidHardwareStatus()
- func (l *License) InitInvalidSignatureStatus()
- func (l *License) InitValidStatus()
- func (l *License) IsValid() bool
- func (l *License) Key() string
 
- type LicenseAttachment
- type LicenseNode
- type Limit
- type ListTuningOptions
- type MetricHistory
- type MetricRank
- type Module
- type NetworkInterface
- type Node
- func (n *Node) CreateSupportFileUrl(file support.File) string
- func (n *Node) DownloadSupportFileUrl(setname, filename string) string
- func (n *Node) GenUrl() string
- func (n *Node) GetMetricUrl(metric, view string) string
- func (n *Node) GetNodeDetailsUrl() string
- func (n *Node) GetSettingUrl(path string) string
- func (n *Node) GetSupportFileUrl() string
- func (n *Node) GetTuningUrl() string
- func (n *Node) IsDown() bool
- func (n *Node) IsLicenseExpired() bool
- func (n *Node) IsLocal() bool
- func (n *Node) IsUnlicensed() bool
- func (n *Node) MatchHardwareSerial(hardwareSerials []string) bool
- func (n *Node) PatchSettingTaskUrl(setting setting.Options) string
- func (n *Node) PatchSupportFileTaskUrl(file support.File) string
- func (n *Node) PatchTriggerTaskUrl(trigger trigger.ApiOptions) string
- func (n *Node) PatchTuningTaskUrl(tuning Tuning) string
- func (n *Node) PatchTuningUrl(tuning Tuning) string
 
- type NodeLicenseStatus
- type Page
- type Period
- type Product
- type RankPoint
- type RawBlockDevice
- type RawLicense
- type RawNetworkInterface
- type RawTuningLimitation
- type RawTuningSpec
- type ReairingInfo
- type Role
- type Selector
- type Service
- type Setting
- type SpaceStatistic
- type StorageIopsSeries
- type StorageLatencySeries
- type StorageTimeSeries
- type TimeBytesPoint
- type TimeMillisecondPoint
- type TimeOpsPoint
- type TimePacketsPoint
- type TimeUsedPercent
- type TimeValue
- type TitlePrefix
- type TrafficStatistic
- type Tuning
- func (t *Tuning) Bytes() ([]byte, error)
- func (t *Tuning) CopyAndOverrideHost(node Node) Tuning
- func (t *Tuning) GenTaskUpdate() Tuning
- func (t *Tuning) GenerateId() string
- func (t *Tuning) IncludeHost(hostname string) bool
- func (t *Tuning) IncludeHosts(hosts []string) bool
- func (t *Tuning) InitHosts(hosts []string)
- func (t *Tuning) InitOkStatus()
- func (t *Tuning) InitResetStatus()
- func (t *Tuning) InitStatus(current, desired string)
- func (t *Tuning) InitUpdateStatus()
- func (t *Tuning) JoinHosts() string
- func (t *Tuning) SearchKey() string
- func (t *Tuning) SetCompleted()
- func (t *Tuning) SetDesired(status string)
- func (t *Tuning) SetError()
- func (t *Tuning) SetNodeInfo(role, address string)
- func (t *Tuning) SetUpdated()
- func (t *Tuning) SetUpdating()
- func (t *Tuning) StrValue() string
 
- type TuningLimitation
- type TuningPolicy
- type TuningReset
- type TuningSpec
- type TuningToggle
- type TuningUpdate
- type User
- type VerificationDetails
- type VmDiskIopsUsage
- type VmMetricsUsage
- type VmNetworkTrafficUsage
- type VmPercentageUsage
- type VmUsage
Constants ¶
      View Source
      
  
    const ( Tokens = "tokens" Logout = "logout" )
      View Source
      
  
    const ( Healths = "healths" AscSort = `columns: ["_time"], desc: false` DescSort = `columns: ["_time"], desc: true` )
      View Source
      
  
    const ( Licenses = "licenses" LicenseDir = "/etc/update" )
      View Source
      
  
    const ( Summary = "summary" Metrics = "metrics" )
      View Source
      
  
    const ( Nodes = "nodes" DataCenterHelpUrl = "https://www.bigstack.co/contact-us" )
      View Source
      
  
    const ( RoleControl = "control" RoleCompute = "compute" RoleStorage = "storage" RoleControlConverged = "control-converged" RoleModerator = "moderator" RoleEdgeCore = "edge-core" )
      View Source
      
  
    const ( ISO8601 = "2006-01-02T15:04:05" ISO8601Z = "2006-01-02T15:04:05+00:00" RFC3339 = time.RFC3339 RFC3339Z = "2006-01-02T15:04:05Z07:00" )
      View Source
      
  
    const ( Tunings = "tunings" TuningRecordTTL = 3600 )
      View Source
      
  
    const (
	ApiDoc = "api-doc"
)
    
      View Source
      
  
    const (
	DataCenters = "datacenters"
)
    
      View Source
      
  
    const (
	Grafana = "grafana"
)
    
      View Source
      
  
    const (
	Integrations = "integrations"
)
    
      View Source
      
  
    const (
	Me = "me"
)
    
      View Source
      
  
    const (
	NetBlockDeviceCode = "43"
)
    
      View Source
      
  
    const (
	NetMajorInterface = "eth0"
)
    
      View Source
      
  
    const (
	OpenSearch = "opensearch"
)
    
      View Source
      
  
    const (
	RadosGatewayPort = 8888
)
    
      View Source
      
  
    const (
	RegionAuto = "auto"
)
    
      View Source
      
  
    const (
	Services = "services"
)
    
      View Source
      
  
    const (
	Settings = "settings"
)
    
      View Source
      
  
const (
	Triggers = "triggers"
)
    Variables ¶
      View Source
      
  
    var ( DefaultKeycloakRealm = "master" DefaultIdpSamlMetadataPath = fmt.Sprintf("/auth/realms/%s/protocol/saml/descriptor", DefaultKeycloakRealm) DefaultSpSamlMetadataPath = "/saml/metadata" DefaultApiServerKey = "/var/www/certs/server.key" DefaultApiServerCert = "/var/www/certs/server.cert" DefaultIdentifierFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" DefaultOidcClientId = "token-connect" DefaultOidcClientSecret = "" DefaultOidcClientOpts = gocloak.Client{ ClientID: gocloak.StringP(DefaultOidcClientId), Protocol: gocloak.StringP("openid-connect"), PublicClient: gocloak.BoolP(false), ClientAuthenticatorType: gocloak.StringP("client-secret"), StandardFlowEnabled: gocloak.BoolP(true), DirectAccessGrantsEnabled: gocloak.BoolP(true), Attributes: &map[string]string{ "access.token.lifespan": "7200", }, } DefaultNodeToken = "" LogoutRedirectUrl = "" )
      View Source
      
  
    var ( HostID string Hostname string DataCenterName string DataCenterVersion string DataCenterNumericVersion string DataCenterVip 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 UpdateNodes = sync.Mutex{} )
      View Source
      
  
    var ( CurrentRole string Roles = []string{RoleControlConverged, RoleControl, RoleCompute, RoleStorage, RoleModerator, RoleEdgeCore} ControlRole = newControlRole() ComputeRole = newComputeRole() StorageRole = newStorageRole() ControlConvergedRole = newControlConvergeRole() ModeratorRole = newModeratorRole() EdgeCoreRole = newEdgeCoreRole() AllRoles = []*Role{ ControlRole, ComputeRole, StorageRole, ControlConvergedRole, ModeratorRole, EdgeCoreRole, } AllGeneralRoles = []*Role{ ControlRole, ComputeRole, StorageRole, ControlConvergedRole, } ControlRoles = []*Role{ ControlRole, ControlConvergedRole, } ComputeRoles = []*Role{ ComputeRole, ControlConvergedRole, EdgeCoreRole, } )
      View Source
      
  
    var ( Day = 24 * time.Hour LocalTimeZone = "+00:00" LocalTimeZoneSeconds = 0 LocalTimeFixedZone = time.FixedZone("", LocalTimeZoneSeconds) )
      View Source
      
  
    var (
	CreateRecordIfNotExist = options.Update().SetUpsert(true)
)
    
      View Source
      
  
    var (
	SerialNumber = ""
)
    
      View Source
      
  
    var (
	ServiceDiscoveryIdentity = ""
)
    
      View Source
      
  
var (
	V1ApiDocUrl = ""
)
    Functions ¶
func CapturePanic ¶
func CapturePanic()
func CheckTuningSpec ¶
func GenNodeAuthHeaders ¶
func GenNodeToken ¶
func GetActiveNodeMap ¶
func GetCloudRoles ¶
func GetCloudRoles() []string
func GetEdgeRoles ¶
func GetEdgeRoles() []string
func GetEmailRecipients ¶
func GetLicenseSearcher ¶
func GetLicenseSearcher() bleve.Index
func GetLocalTunings ¶
func GetMacAddr ¶
func GetNodeSearcher ¶
func GetNodeSearcher() bleve.Index
func GetRadosGatewayUrl ¶
func GetRadosGatewayUrl() string
func GetRegisteredServices ¶
func GetSlackChannels ¶
func GetSlackChannels() ([]slack.ApiChannel, error)
func GetSystemSerial ¶
func GetTuningSearcher ¶
func GetTuningSearcher() bleve.Index
func GetTuningSpecs ¶
func HostnameNodeMap ¶
func InitLicenseSearchIndex ¶
func InitLicenseSearchIndex() error
func InitNodeSearchIndex ¶
func InitNodeSearchIndex() error
func InitTuningSearchIndex ¶
func InitTuningSearchIndex() error
func IsCloudRole ¶
func IsEdgeRole ¶
func IsLocalNode ¶
func NewLicenseSearcher ¶
func NewLicenseSearcher() (bleve.Index, error)
func RepairCollection ¶
func RepairCollection() string
func SetLicenses ¶
func SetLicenses(licenses []License)
func SetLocalTuning ¶
func SetLocalTuning(tuning Tuning)
func SetNodeDetails ¶
func SetNodeDetails(nodesWithDetails []Node)
func SetTuningSpec ¶
func SetTuningSpec(name string, spec *TuningSpec)
func SettingsDB ¶
func SettingsDB() string
func ShouldIHandleTheTuning ¶
func SyncRoleNodes ¶
func SyncRoleNodes()
func TimPastRFC3339 ¶
func TimeISO8601Z ¶
func TimeLocalISO8601 ¶
func TimeLocalRFC3339 ¶
func TimeNowRFC3339 ¶
func TimeNowRFC3339() string
func TimeNowRFC3339Z ¶
func TimeNowRFC3339Z() string
func TimePastRFC3339Z ¶
func TimeRFC3339 ¶
func TimeRFC3339Z ¶
func TitlePrefixCollection ¶
func TitlePrefixCollection() string
func ToLowerInPlace ¶
func ToLowerInPlace(ss []string)
func TuningCollection ¶
func TuningReqCollection ¶
func TuningReqCollection() string
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 BlockDevice ¶
type BlockDevice struct {
	Serial       string             `json:"serial"`
	Name         string             `json:"device" yaml:"device" bson:"device"`
	Type         string             `json:"type" yaml:"type" bson:"type"`
	SizeMiB      float64            `json:"sizeMiB" yaml:"sizeMiB" bson:"sizeMiB"`
	Availability string             `json:"availability" yaml:"availability" bson:"availability"`
	Status       status.BlockDevice `json:"status" yaml:"status" bson:"status"`
}
    type BlockDeviceStatus ¶
type ComputeStatistic ¶
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 DataCenterUsage ¶
type DataCenterUsage struct {
	Cpu    ComputeStatistic `json:"cpu"`
	Memory SpaceStatistic   `json:"memory"`
}
    type HealthCheck ¶
type HealthCheck struct {
	Time   string `json:"time"`
	Status string `json:"status"`
	*Error `json:"error,omitempty"`
}
    func (*HealthCheck) IsNg ¶
func (h *HealthCheck) IsNg() bool
type Host ¶
type HostNetworkPacket ¶
type HostNetworkPacket struct {
	Id      string             `json:"id"`
	Name    string             `json:"name"`
	Packets float64            `json:"packets"`
	History []TimePacketsPoint `json:"history"`
}
    type HostPercentageUsage ¶
type HostPercentageUsage struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	UsedPercent float64           `json:"usedPercent"`
	History     []TimeUsedPercent `json:"history"`
}
    type HostUsage ¶
type HostUsage struct {
	Cpu    ComputeStatistic `json:"cpu"`
	Memory SpaceStatistic   `json:"memory"`
}
    type Integration ¶
type License ¶
type License struct {
	Name        string   `json:"name" yaml:"name" bson:"name"`
	Type        string   `json:"type" yaml:"type" bson:"type"`
	Hostname    string   `json:"hostname,omitzero" yaml:"hostname" bson:"hostname"`
	Hosts       []string `json:"hosts,omitempty" yaml:"hosts" bson:"hosts"`
	Serial      string   `json:"serial,omitzero" yaml:"serial" bson:"serial"`
	Product     `json:"product" yaml:"product" bson:"product"`
	Issue       `json:"issue" yaml:"issue" bson:"issue"`
	Quantity    string `json:"quantity" yaml:"quantity" bson:"quantity"`
	SupportPlan string `json:"supportPlan" yaml:"supportPlan" bson:"supportPlan"`
	Expiry      `json:"expiry" yaml:"expiry" bson:"expiry"`
	Status      status.License `json:"status" yaml:"status" bson:"status"`
}
    func GetLicenses ¶
func GetLicenses() []License
func (*License) GenSearchableObject ¶
note: in the current search lib(bleve), the algo is not able to detect the string if it include uppercase we've tried a few different init settings, but the result is not as expected as always currenlty, the only way we found is to convert all the string to lower case and inject to searcher
func (*License) InitCompromisedStatus ¶
func (l *License) InitCompromisedStatus()
func (*License) InitExpiredStatus ¶
func (l *License) InitExpiredStatus()
func (*License) InitInvalidHardwareStatus ¶
func (l *License) InitInvalidHardwareStatus()
func (*License) InitInvalidSignatureStatus ¶
func (l *License) InitInvalidSignatureStatus()
func (*License) InitValidStatus ¶
func (l *License) InitValidStatus()
type LicenseAttachment ¶
type LicenseAttachment struct {
	SerialNumber string `json:"serialNumber"`
	Hostname     string `json:"hostname"`
	Role         string `json:"role"`
	Product      string `json:"product"`
	Status       string `json:"status"`
}
    func (*LicenseAttachment) GenSearchableObject ¶
func (l *LicenseAttachment) GenSearchableObject() LicenseAttachment
type LicenseNode ¶
type ListTuningOptions ¶
type ListTuningOptions struct {
	AllNodes bool
}
    type MetricHistory ¶
type MetricRank ¶
type Module ¶
type Module struct {
	Name         string         `json:"name" bson:"name"`
	Status       *status.Health `json:"status,omitempty" bson:"status,omitempty"`
	IsRepairable bool           `json:"-" bson:"isRepairable"`
	Description  string         `json:"description,omitempty" bson:"description"`
}
    func (*Module) InitOkStatus ¶
func (m *Module) InitOkStatus()
func (*Module) SetRepairingStatus ¶
func (m *Module) SetRepairingStatus()
func (*Module) SetUnhealthyStatus ¶
func (m *Module) SetUnhealthyStatus()
type NetworkInterface ¶
type NetworkInterface struct {
	Label       string `json:"label" yaml:"label" bson:"label"`
	BusIdSlaves string `json:"busIdSlaves" yaml:"busIdSlaves" bson:"busIdSlaves"`
	Driver      string `json:"driver" yaml:"driver" bson:"driver"`
	State       string `json:"state" yaml:"state" bson:"state"`
	Speed       string `json:"speed" yaml:"speed" bson:"speed"`
}
    type Node ¶
type Node struct {
	Id                string `json:"id" yaml:"id"`
	SerialNumber      string `json:"serialNumber" yaml:"serialNumber"`
	DataCenter        string `json:"dataCenter" yaml:"dataCenter"`
	Hostname          string `json:"hostname" yaml:"hostname"`
	Role              string `json:"role" yaml:"role"`
	Protocol          string `json:"protocol,omitempty" yaml:"protocol,omitempty" bson:"protocol,omitempty"`
	Address           string `json:"address" yaml:"address"`
	Ip                string `json:"ip" yaml:"ip"`
	ManagementIP      string `json:"managementIP" yaml:"managementIP"`
	StorageIP         string `json:"storageIP" yaml:"storageIP"`
	License           `json:"license" yaml:"license,omitempty" bson:"license,omitempty"`
	Status            string             `json:"status" yaml:"status"`
	CpuSpec           string             `json:"cpuSpec" yaml:"cpuSpec" bson:"cpuSpec"`
	NetworkInterfaces []NetworkInterface `json:"networkInterfaces" yaml:"networkInterfaces" bson:"networkInterfaces"`
	BlockDevices      []BlockDevice      `json:"blockDevices" yaml:"blockDevices" bson:"blockDevices"`
	Vcpu              ComputeStatistic   `json:"vcpu" yaml:"vcpu" bson:"vcpu"`
	Memory            SpaceStatistic     `json:"memory" yaml:"memory" bson:"memory"`
	Storage           SpaceStatistic     `json:"storage" yaml:"storage" bson:"storage"`
	UptimeSeconds     float64            `json:"uptimeSeconds" yaml:"uptimeSeconds" bson:"uptimeSeconds"`
	Labels            map[string]string  `json:"labels,omitempty" yaml:"labels,omitempty" bson:"labels,omitempty"`
}
    func GetControlNodes ¶
func GetNodeByHostname ¶
func GetNodesByRole ¶
func GetNodesFromRoles ¶
func GetNodesFromRoles() []Node
func GetOneOfControllerNode ¶
func GetPeerControlNodes ¶
func (*Node) DownloadSupportFileUrl ¶
func (*Node) GetMetricUrl ¶
func (*Node) GetNodeDetailsUrl ¶
func (*Node) GetSettingUrl ¶
func (*Node) GetSupportFileUrl ¶
func (*Node) GetTuningUrl ¶
func (*Node) IsLicenseExpired ¶
func (*Node) IsUnlicensed ¶
func (*Node) MatchHardwareSerial ¶
func (*Node) PatchSettingTaskUrl ¶
func (*Node) PatchSupportFileTaskUrl ¶
func (*Node) PatchTriggerTaskUrl ¶
func (n *Node) PatchTriggerTaskUrl(trigger trigger.ApiOptions) string
func (*Node) PatchTuningTaskUrl ¶
func (*Node) PatchTuningUrl ¶
type NodeLicenseStatus ¶
type Page ¶
type Page struct {
	Total          int64 `json:"total"`
	Number         int   `json:"number"`
	Size           int   `json:"size"`
	TotalItemCount int64 `json:"totalItemCount"`
}
    func (Page) IsRequired ¶
type RawBlockDevice ¶
type RawBlockDevice struct {
	Type        string   `json:"type"`
	Serial      string   `json:"serial"`
	Name        string   `json:"name"`
	Size        string   `json:"size"`
	Rota        bool     `json:"rota"`
	MountPoints []string `json:"mountpoints"`
}
    func (*RawBlockDevice) IsBlock ¶
func (r *RawBlockDevice) IsBlock() bool
func (*RawBlockDevice) IsPartition ¶
func (r *RawBlockDevice) IsPartition() bool
func (*RawBlockDevice) NoMountPoints ¶
func (r *RawBlockDevice) NoMountPoints() bool
type RawLicense ¶
type RawLicense struct {
	Name     string `json:"name" yaml:"name" bson:"name"`
	Type     string `json:"type" yaml:"type" bson:"type"`
	Hostname string `json:"hostname" yaml:"hostname" bson:"hostname"`
	Product  string `json:"product" yaml:"product" bson:"product"`
	Feature  string `json:"feature" yaml:"feature" bson:"feature"`
	Quantity string `json:"quantity" yaml:"quantity" bson:"quantity"`
	SLA      string `json:"sla" yaml:"sla" bson:"sla"`
	Serial   string `json:"serial" yaml:"serial" bson:"serial"`
	Check    int    `json:"check" yaml:"check" bson:"check"`
	IssueBy  string `json:"issueby" yaml:"issueby" bson:"issueby"`
	IssueTo  string `json:"issueto" yaml:"issueto" bson:"issueto"`
	Hardware string `json:"hardware" yaml:"hardware" bson:"hardware"`
	Expiry   string `json:"expiry" yaml:"expiry" bson:"expiry"`
	Date     string `json:"date" yaml:"date" bson:"date"`
	Days     int    `json:"days" yaml:"days" bson:"days"`
}
    func (*RawLicense) IsUnlicense ¶
func (r *RawLicense) IsUnlicense() bool
type RawNetworkInterface ¶
type RawNetworkInterface struct {
	Label       string `json:"label" yaml:"label" bson:"label"`
	BusIdSlaves string `json:"busid" yaml:"busid" bson:"busid"`
	Driver      string `json:"driver" yaml:"driver" bson:"driver"`
	State       string `json:"state" yaml:"state" bson:"state"`
	Speed       string `json:"speed" yaml:"speed" bson:"speed"`
}
    type RawTuningLimitation ¶
type RawTuningSpec ¶
type RawTuningSpec struct {
	Name        string              `json:"name"`
	Description string              `json:"description"`
	Limitation  RawTuningLimitation `json:"limitation"`
}
    type ReairingInfo ¶
type Role ¶
type Role struct {
	Name  string `json:"name" bson:"name"`
	Hosts []Host `json:"hosts" bson:"hosts"`
	Nodes []Node `json:"-"`
}
    func GetComputeRole ¶
func GetComputeRole() *Role
func GetControlConvergeRole ¶
func GetControlConvergeRole() *Role
func GetControlRole ¶
func GetControlRole() *Role
func GetControlRoles ¶
func GetControlRoles() []*Role
func GetEdgeCoreRole ¶
func GetEdgeCoreRole() *Role
func GetModeratorRole ¶
func GetModeratorRole() *Role
func GetRolesToHandleTuning ¶
func GetStorageRole ¶
func GetStorageRole() *Role
func (*Role) IsNodeEmpty ¶
type Service ¶
type Service struct {
	Name               string         `json:"name" bson:"name"`
	Category           string         `json:"category" bson:"category"`
	Status             *status.Health `json:"status,omitempty" bson:"status,omitempty"`
	Modules            []Module       `json:"modules" bson:"modules"`
	IsInternalViewOnly bool           `json:"-" bson:"isInternalViewOnly"`
}
    func (*Service) ConvergeUnhealthyStatus ¶
func (*Service) CopyModuleEmptyStruct ¶
func (*Service) InitOkStatus ¶
func (s *Service) InitOkStatus()
func (*Service) IsStatusOk ¶
func (*Service) SetRepairingStatus ¶
func (s *Service) SetRepairingStatus(repairingInfo ReairingInfo)
type SpaceStatistic ¶
type StorageIopsSeries ¶
type StorageIopsSeries struct {
	Unit  string         `json:"unit"`
	Read  []TimeOpsPoint `json:"read"`
	Write []TimeOpsPoint `json:"write"`
}
    type StorageLatencySeries ¶
type StorageLatencySeries struct {
	Read  []TimeMillisecondPoint `json:"read"`
	Write []TimeMillisecondPoint `json:"write"`
}
    type StorageTimeSeries ¶
type TimeBytesPoint ¶
type TimeMillisecondPoint ¶
type TimeOpsPoint ¶
type TimePacketsPoint ¶
type TimeUsedPercent ¶
type TitlePrefix ¶
type TitlePrefix struct {
	Value string `json:"value" bson:"value"`
}
    type TrafficStatistic ¶
type Tuning ¶
type Tuning struct {
	Id          string           `json:"id,omitempty" yaml:"-" bson:"id"`
	Name        string           `json:"name" yaml:"name" bson:"name"`
	Value       any              `json:"value" yaml:"value" bson:"value"`
	Description string           `json:"description" yaml:"-" bson:"-"`
	Enabled     bool             `json:"enabled" yaml:"enabled" bson:"enabled"`
	IsModified  bool             `json:"isModified" yaml:"-" bson:"-"`
	Limitation  TuningLimitation `json:"limitation" yaml:"-" bson:"-"`
	*Node  `json:"node,omitempty" yaml:"-" bson:"-"`
	Hosts  []Host         `json:"hosts" yaml:"-" bson:"-"`
	Roles  []Role         `json:"roles,omitempty" yaml:"-" bson:"-"`
	Status *status.Tuning `json:"status,omitempty" yaml:"-" bson:"status,omitempty"`
}
    func GetLocalTuning ¶
func ListLocalTunings ¶
func ListLocalTunings() []Tuning
func (*Tuning) CopyAndOverrideHost ¶
func (*Tuning) GenTaskUpdate ¶
func (*Tuning) GenerateId ¶
func (*Tuning) IncludeHost ¶
func (*Tuning) IncludeHosts ¶
func (*Tuning) InitOkStatus ¶
func (t *Tuning) InitOkStatus()
func (*Tuning) InitResetStatus ¶
func (t *Tuning) InitResetStatus()
func (*Tuning) InitStatus ¶
func (*Tuning) InitUpdateStatus ¶
func (t *Tuning) InitUpdateStatus()
func (*Tuning) SetCompleted ¶
func (t *Tuning) SetCompleted()
func (*Tuning) SetDesired ¶
func (*Tuning) SetNodeInfo ¶
func (*Tuning) SetUpdated ¶
func (t *Tuning) SetUpdated()
func (*Tuning) SetUpdating ¶
func (t *Tuning) SetUpdating()
type TuningLimitation ¶
type TuningPolicy ¶
type TuningPolicy struct {
	Name    string   `json:"name" yaml:"name"`
	Version string   `json:"version" yaml:"version"`
	Enabled bool     `json:"enabled" yaml:"enabled"`
	Tunings []Tuning `json:"tunings" yaml:"tunings"`
}
    func (*TuningPolicy) AppendTuning ¶
func (t *TuningPolicy) AppendTuning(tuning Tuning)
func (*TuningPolicy) AppendTunings ¶
func (t *TuningPolicy) AppendTunings(tunings []Tuning)
func (*TuningPolicy) DeleteTuning ¶
func (t *TuningPolicy) DeleteTuning(name string)
func (*TuningPolicy) HasMatchedTuning ¶
func (t *TuningPolicy) HasMatchedTuning(tuning Tuning) bool
func (*TuningPolicy) UpdateOrAppendTuning ¶
func (t *TuningPolicy) UpdateOrAppendTuning(tuning Tuning)
type TuningReset ¶
type TuningReset struct {
	Hosts []string `json:"hosts"`
}
    type TuningSpec ¶
type TuningSpec struct {
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Limitation  TuningLimitation `json:"limitation"`
	Roles       []*Role          `json:"roles"`
	Selector    `json:"-"`
}
    func GetTuningSpec ¶
func GetTuningSpec(name string) (*TuningSpec, error)
func ListTuningSpecs ¶
func ListTuningSpecs() []TuningSpec
func (*TuningSpec) IsInLimitedRange ¶
func (t *TuningSpec) IsInLimitedRange(value int) bool
type TuningToggle ¶
type TuningUpdate ¶
type VerificationDetails ¶
type VerificationDetails struct {
	License     `json:"license" yaml:"license" bson:"license"`
	EffectNodes []LicenseNode `json:"effectNodes" yaml:"effectNodes" bson:"effectNodes"`
}
    type VmDiskIopsUsage ¶
type VmDiskIopsUsage struct {
	Id      string         `json:"id"`
	Name    string         `json:"name"`
	Device  string         `json:"device,omitempty"`
	Ops     float64        `json:"ops"`
	History []TimeOpsPoint `json:"history"`
}
    type VmMetricsUsage ¶
type VmMetricsUsage struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Device      string            `json:"device,omitempty"`
	UsedPercent float64           `json:"usedPercent"`
	History     []TimeUsedPercent `json:"history"`
}
    type VmNetworkTrafficUsage ¶
type VmNetworkTrafficUsage struct {
	Id      string             `json:"id"`
	Name    string             `json:"name"`
	Device  string             `json:"device,omitempty"`
	Packets float64            `json:"packets"`
	History []TimePacketsPoint `json:"history"`
}
    type VmPercentageUsage ¶
type VmPercentageUsage struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	UsedPercent float64           `json:"usedPercent"`
	History     []TimeUsedPercent `json:"history"`
}
    type VmUsage ¶
type VmUsage struct {
	Vcpu    ComputeStatistic `json:"vcpu"`
	Memory  SpaceStatistic   `json:"memory"`
	Storage SpaceStatistic   `json:"storage"`
}
    
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.