Documentation
¶
Overview ¶
Package ui provides HTTP handlers for the Loki UI and cluster management interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string `json:"version"`
Revision string `json:"revision"`
Branch string `json:"branch"`
BuildUser string `json:"buildUser"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
}
BuildInfo contains version and build information about a member.
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"` // Whether to enable the UI.
NodeName string `yaml:"node_name" doc:"default=<hostname>"` // Name to use for this node in the cluster.
AdvertiseAddr string `yaml:"advertise_addr"`
InfNames []string `yaml:"interface_names" doc:"default=[<private network interfaces>]"`
RejoinInterval time.Duration `yaml:"rejoin_interval"` // How frequently to rejoin the cluster to address split brain issues.
ClusterMaxJoinPeers int `yaml:"cluster_max_join_peers"` // Number of initial peers to join from the discovered set.
ClusterName string `yaml:"cluster_name"` // Name to prevent nodes without this identifier from joining the cluster.
EnableIPv6 bool `yaml:"enable_ipv6"`
Debug bool `yaml:"debug"`
Discovery struct {
JoinPeers []string `yaml:"join_peers"`
} `yaml:"discovery"`
AdvertisePort int `yaml:"-"`
}
func (*Config) RegisterFlags ¶
func (Config) WithAdvertisePort ¶
type Member ¶
type Member struct {
Addr string `json:"addr"`
State string `json:"state"`
IsSelf bool `json:"isSelf"`
Target string `json:"target"`
Services []ServiceState `json:"services"`
Build BuildInfo `json:"build"`
Error error `json:"error,omitempty"`
Ready ReadyResponse `json:"ready,omitempty"`
// contains filtered or unexported fields
}
Member represents a node in the cluster with its current state and capabilities.
type NodeDetails ¶
type NodeDetails struct {
Member
Config string `json:"config"`
ClusterID string `json:"clusterID"`
ClusterSeededAt int64 `json:"clusterSeededAt"`
OS string `json:"os"`
Arch string `json:"arch"`
Edition string `json:"edition"`
Metrics map[string]interface{} `json:"metrics"`
}
NodeDetails contains the details of a node in the cluster. It adds on top of Member the config, build, clusterID, clusterSeededAt, os, arch, edition and registered analytics metrics.
type ReadyResponse ¶
type Service ¶
func NewService ¶
func NewService(cfg Config, router *mux.Router, logger log.Logger, reg prometheus.Registerer) (*Service, error)
func (*Service) RegisterHandler ¶
func (s *Service) RegisterHandler()
RegisterHandler registers all UI API routes with the provided router.
type ServiceState ¶
ServiceState represents the current state of a service running on a member.
Click to show internal directories.
Click to hide internal directories.