Documentation
¶
Index ¶
Constants ¶
View Source
const ( RuntimeDocker = containerruntime.Docker RuntimePodman = containerruntime.Podman RuntimeNone = containerruntime.None )
Variables ¶
View Source
var ( ErrUnknownService = errors.New("unknown control-plane service") ErrInvalidAction = errors.New("invalid action") )
View Source
var LiveServiceNames = []string{"dapr_scheduler", "dapr_placement"}
LiveServiceNames are the self-hosted control-plane containers this dashboard manages.
Functions ¶
func IsLiveName ¶
func ValidAction ¶
ValidAction reports whether action is one of the allowed lifecycle verbs.
Types ¶
type ListResult ¶
type ListResult struct {
Runtime RuntimeKind `json:"runtime"`
Available bool `json:"available"`
Reachable bool `json:"reachable"` // runtime daemon responded
ControlPlanePresent bool `json:"controlPlanePresent"` // >=1 live container exists
Services []Service `json:"services"`
}
ListResult is the payload of GET /api/controlplane.
type Manager ¶
type Manager interface {
List(ctx context.Context) (ListResult, error)
Do(ctx context.Context, action, name string) error
LogStream(ctx context.Context, name string) (<-chan string, error)
}
Manager lists and controls the local control-plane services.
type RuntimeKind ¶
type RuntimeKind = containerruntime.Kind
RuntimeKind identifies the resolved container runtime.
type Service ¶
type Service struct {
Name string `json:"name"`
Status ServiceStatus `json:"status"`
Healthy bool `json:"healthy"`
Ports []string `json:"ports"`
MemoryBytes uint64 `json:"memoryBytes"`
MemoryHuman string `json:"memoryHuman"`
LogPath string `json:"logPath"`
Actionable bool `json:"actionable"`
ComposeProject string `json:"composeProject,omitempty"`
}
Service is one control-plane service row returned by GET /api/controlplane.
type ServiceStatus ¶
type ServiceStatus string
ServiceStatus is the coarse lifecycle state shown in the UI.
const ( StatusRunning ServiceStatus = "running" StatusStopped ServiceStatus = "stopped" StatusUnknown ServiceStatus = "unknown" )
Click to show internal directories.
Click to hide internal directories.