Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SettingsConfigMapName contains a name of config map, that stores settings. SettingsConfigMapName = "kubernetes-dashboard-settings" // SettingsConfigMapNamespace contains a namespace of config map, that stores settings. SettingsConfigMapNamespace = "kube-system" // ConfigMapKindName is a name of config map kind. ConfigMapKindName = "ConfigMap" // ConfigMapAPIVersion is a API version of config map. ConfigMapAPIVersion = "v1" // GlobalSettingsKey is a settings map key which maps to current global settings. GlobalSettingsKey = "_global" // ConcurrentSettingsChangeError occurs during settings save if settings were modified concurrently. // Keep it in sync with CONCURRENT_CHANGE_ERROR constant from the frontend. ConcurrentSettingsChangeError = "settings changed since last reload" )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultSettingsConfigMap ¶
GetDefaultSettingsConfigMap returns config map with default settings.
Types ¶
type Settings ¶
type Settings struct { ClusterName string `json:"clusterName"` ItemsPerPage int `json:"itemsPerPage"` AutoRefreshTimeInterval int `json:"autoRefreshTimeInterval"` }
Settings is a single instance of settings without context.
func GetDefaultSettings ¶
func GetDefaultSettings() Settings
GetDefaultSettings returns settings structure, that should be used if there are no global or local settings overriding them. It should not change during runtime.
type SettingsManager ¶
type SettingsManager interface { // GetGlobalSettings gets current global settings from config map. GetGlobalSettings(client kubernetes.Interface) (s *Settings) // SaveGlobalSettings saves provided global settings in config map. SaveGlobalSettings(client kubernetes.Interface, s *Settings) }
SettingsManager is used for user settings management.
Click to show internal directories.
Click to hide internal directories.