Documentation ¶
Index ¶
- type Manager
- func (m *Manager) DegradedWorkspace(workspaceID string) bool
- func (m *Manager) DegradedWorkspaces() []string
- func (m *Manager) Run(ctx context.Context)
- func (m *Manager) SourceToWorkspace(ctx context.Context, sourceID string) (string, error)
- func (m *Manager) WatchConfig(ctx context.Context) <-chan map[string]backendconfig.ConfigT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { BackendConfig backendconfig.BackendConfig DegradedWorkspaceIDs []string // contains filtered or unexported fields }
func (*Manager) DegradedWorkspace ¶
DegradedWorkspace returns true if the workspaceID is degraded.
func (*Manager) DegradedWorkspaces ¶
DegradedWorkspaces returns a list of degraded workspaceIDs.
func (*Manager) SourceToWorkspace ¶
SourceToWorkspace returns the workspaceID for a given sourceID, even if workspaceID is degraded. An error is returned if the sourceID is not found, or context is canceled.
NOTE: This function blocks until the backend config is loaded.
func (*Manager) WatchConfig ¶
WatchConfig returns a backend config map that excludes degraded workspaces.
NOTE: WatchConfig is responsible for closing the channel when context gets cancel.
Click to show internal directories.
Click to hide internal directories.