Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TypeID_SYS_PING is a lightweight, side-effect-free health check RPC for Env App. // // NOTE: The type_id must match Env App: internal/envapp/ui_src/src/ui/protocol/redeven_v1/typeIds.ts. TypeID_SYS_PING uint32 = 4001 // TypeID_SYS_UPGRADE triggers an in-place self-upgrade (download latest + restart). // // NOTE: The type_id must match Env App: internal/envapp/ui_src/src/ui/protocol/redeven_v1/typeIds.ts. TypeID_SYS_UPGRADE uint32 = 4002 // TypeID_SYS_RESTART restarts the runtime process (best-effort). // // NOTE: The type_id must match Env App: internal/envapp/ui_src/src/ui/protocol/redeven_v1/typeIds.ts. TypeID_SYS_RESTART uint32 = 4003 )
View Source
const ( MaintenanceKindUpgrade = "upgrade" MaintenanceKindRestart = "restart" MaintenanceStateRunning = "running" MaintenanceStateFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MaintenanceSnapshot ¶
type MaintenanceSnapshot struct {
Kind string `json:"kind,omitempty"`
State string `json:"state,omitempty"`
TargetVersion string `json:"target_version,omitempty"`
Message string `json:"message,omitempty"`
StartedAtMs int64 `json:"started_at_ms,omitempty"`
UpdatedAtMs int64 `json:"updated_at_ms,omitempty"`
}
type MaintenanceSnapshotProvider ¶
type MaintenanceSnapshotProvider interface {
CurrentMaintenanceSnapshot() *MaintenanceSnapshot
}
type Options ¶
type Options struct {
AgentInstanceID string
ProcessStartedAtMs int64
Version string
Commit string
BuildTime string
Upgrader Upgrader
Restarter Restarter
Maintenance MaintenanceSnapshotProvider
RuntimeService RuntimeServiceSnapshotProvider
}
type RestartRequest ¶
type RestartRequest struct{}
type RestartResponse ¶
type Restarter ¶
type Restarter interface {
StartRestart(ctx context.Context, meta *session.Meta, req *RestartRequest) (*RestartResponse, error)
}
type RuntimeServiceSnapshot ¶
type RuntimeServiceSnapshot = runtimeservice.Snapshot
type RuntimeServiceSnapshotProvider ¶
type RuntimeServiceSnapshotProvider interface {
CurrentRuntimeServiceSnapshot() RuntimeServiceSnapshot
}
type RuntimeServiceWorkload ¶
type RuntimeServiceWorkload = runtimeservice.Workload
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) RegisterWithAccessGate ¶
type UpgradeRequest ¶
type UpgradeResponse ¶
type Upgrader ¶
type Upgrader interface {
StartUpgrade(ctx context.Context, meta *session.Meta, req *UpgradeRequest) (*UpgradeResponse, error)
}
Click to show internal directories.
Click to hide internal directories.