Documentation
¶
Index ¶
- Constants
- func AssetVersion() string
- func JoinPath(basePath, sub string) string
- func StaticHandler(prefix string) http.Handler
- type BadgeState
- type CachedDataSource
- type ClusterDetail
- type ClusterSummary
- type ConditionRow
- type DataSource
- type EndpointsInfo
- type Identity
- type Options
- type PersistenceInfo
- type RelatedResource
- type Server
- type ServiceRow
- type UpgradeInfo
Constants ¶
const ( BadgeOK = model.BadgeOK BadgeWarn = model.BadgeWarn BadgeError = model.BadgeError BadgePending = model.BadgePending BadgeUnknown = model.BadgeUnknown )
Variables ¶
This section is empty.
Functions ¶
func AssetVersion ¶
func AssetVersion() string
AssetVersion returns a short content hash of all embedded assets, used as a cache-busting query string. The result is memoized.
func JoinPath ¶
JoinPath joins the UI base path with a sub-path (which must start with "/"), avoiding a duplicate leading slash that would produce a protocol-relative URL.
func StaticHandler ¶
StaticHandler serves the embedded assets under the given prefix with a long cache lifetime (assets are content-versioned via AssetVersion()).
Types ¶
type BadgeState ¶
type BadgeState = model.BadgeState
BadgeState is the visual state of a status badge.
type CachedDataSource ¶
CachedDataSource reads from a controller-runtime cached client.Reader.
func (*CachedDataSource) GetCluster ¶
func (d *CachedDataSource) GetCluster(ctx context.Context, namespace, name string) (*ClusterDetail, error)
GetCluster returns the detail view for one cluster plus its related satellites.
func (*CachedDataSource) ListClusters ¶
func (d *CachedDataSource) ListClusters(ctx context.Context) ([]ClusterSummary, error)
ListClusters returns every TemporalCluster sorted by namespace then name.
type ClusterDetail ¶
type ClusterDetail = model.ClusterDetail
ClusterDetail is the full per-cluster view.
type ClusterSummary ¶
type ClusterSummary = model.ClusterSummary
ClusterSummary is one row/card on the overview.
func SummaryFromCluster ¶
func SummaryFromCluster(c *temporalv1alpha1.TemporalCluster) ClusterSummary
SummaryFromCluster maps a TemporalCluster to its overview view-model.
type DataSource ¶
type DataSource interface {
ListClusters(ctx context.Context) ([]ClusterSummary, error)
GetCluster(ctx context.Context, namespace, name string) (*ClusterDetail, error)
}
DataSource provides view-models to the handlers. It is the seam that lets a future SSE/watch-push implementation replace cache polling.
type EndpointsInfo ¶
type EndpointsInfo = model.EndpointsInfo
EndpointsInfo holds resolved endpoints.
type Options ¶
type Options struct {
// BindAddress is the listen address; empty disables the UI.
BindAddress string
// RefreshInterval is the htmx poll interval surfaced to templates.
RefreshInterval time.Duration
// BasePath is the URL prefix the UI is served under (no trailing slash).
BasePath string
// RequireAuth makes the server return 401 when no trusted user header is present.
RequireAuth bool
// UserHeader, GroupsHeader and EmailHeader are the trusted forward-auth headers.
UserHeader string
GroupsHeader string
EmailHeader string
}
Options configures the UI server.
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns the UI options used when the UI is enabled.
Note: BindAddress here (":8082") is the suggested address once the UI is turned on; it is NOT the runtime default. The CLI flag --ui-bind-address defaults to empty (disabled), and Normalize never fills BindAddress from these defaults, so an empty BindAddress keeps the UI off.
func (Options) IdentityFrom ¶
IdentityFrom extracts the Identity from the configured trusted headers.
type PersistenceInfo ¶
type PersistenceInfo = model.PersistenceInfo
PersistenceInfo summarizes datastore state.
type RelatedResource ¶
type RelatedResource = model.RelatedResource
RelatedResource is a satellite CRD tied to a cluster.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the operator UI. It implements manager.Runnable and manager.LeaderElectionRunnable (so it runs on every replica).
func NewServer ¶
func NewServer(opts Options, data DataSource, log logr.Logger) *Server
NewServer builds a UI server.
func (*Server) NeedLeaderElection ¶
NeedLeaderElection returns false so the UI runs regardless of leadership.
type ServiceRow ¶
type ServiceRow = model.ServiceRow
ServiceRow reports readiness of one Temporal service.