Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorStyle ¶
ColorStyle returns the ANSI-colored bullet given a color key and a plain bullet symbol.
Types ¶
type ComposeClient ¶
type ComposeClient interface {
ComposeConfigFull(ctx context.Context, workingDir string, files []string, profiles []string, envFiles []string, inline []string) (dockercli.ComposeConfigDoc, error)
}
ComposeClient captures the docker compose operations required by the dashboard loader.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader prepares dashboard-ready data derived from the manifest and compose files.
func NewLoader ¶
func NewLoader(cfg *manifest.Config, docker ComposeClient) (*Loader, error)
NewLoader creates a new dashboard data loader. The docker client may be nil for tests.
func (*Loader) StackSummaries ¶
func (l *Loader) StackSummaries(ctx context.Context) ([]StackSummary, error)
StackSummaries resolves compose metadata for each manifest stack.
type ServiceSummary ¶
type ServiceSummary struct {
Service string
ContainerName string
Image string
Networks []string
Volumes []string
}
ServiceSummary holds the compose service metadata displayed in the dashboard.
type StackSummary ¶
type StackSummary struct {
Name string
Services []ServiceSummary
}
StackSummary represents the information needed to populate the stacks column.
type StatusProvider ¶
type StatusProvider struct {
// contains filtered or unexported fields
}
StatusProvider resolves container names for services and fetches their docker ps status.
func NewStatusProvider ¶
func NewStatusProvider(d *dockercli.Client, identifier string) *StatusProvider
func (*StatusProvider) Docker ¶
func (sp *StatusProvider) Docker() *dockercli.Client
Docker exposes the underlying docker client; used by the TUI to stream logs.
func (*StatusProvider) FetchAll ¶
func (sp *StatusProvider) FetchAll(ctx context.Context, stacks []StackSummary) (map[Key]Status, error)
FetchAll returns a map from (stack, service) to Status. Unknown entries are omitted.
func (*StatusProvider) ResolveContainerName ¶
func (sp *StatusProvider) ResolveContainerName(ctx context.Context, stackName string, svc ServiceSummary) (string, error)
ResolveContainerName chooses the container name for a service. Prefer an explicit container name from compose; otherwise, a best-effort lookup by labels.