bd sync: 2025-12-23 23:38:57
This commit is contained in:
@@ -395,6 +395,48 @@ func (c *Client) EpicStatus(args *EpicStatusArgs) (*Response, error) {
|
||||
return c.Execute(OpEpicStatus, args)
|
||||
}
|
||||
|
||||
// Gate operations (bd-likt)
|
||||
|
||||
// GateCreate creates a gate via the daemon
|
||||
func (c *Client) GateCreate(args *GateCreateArgs) (*Response, error) {
|
||||
return c.Execute(OpGateCreate, args)
|
||||
}
|
||||
|
||||
// GateList lists gates via the daemon
|
||||
func (c *Client) GateList(args *GateListArgs) (*Response, error) {
|
||||
return c.Execute(OpGateList, args)
|
||||
}
|
||||
|
||||
// GateShow shows a gate via the daemon
|
||||
func (c *Client) GateShow(args *GateShowArgs) (*Response, error) {
|
||||
return c.Execute(OpGateShow, args)
|
||||
}
|
||||
|
||||
// GateClose closes a gate via the daemon
|
||||
func (c *Client) GateClose(args *GateCloseArgs) (*Response, error) {
|
||||
return c.Execute(OpGateClose, args)
|
||||
}
|
||||
|
||||
// GateWait adds waiters to a gate via the daemon
|
||||
func (c *Client) GateWait(args *GateWaitArgs) (*Response, error) {
|
||||
return c.Execute(OpGateWait, args)
|
||||
}
|
||||
|
||||
// GetWorkerStatus retrieves worker status via the daemon
|
||||
func (c *Client) GetWorkerStatus(args *GetWorkerStatusArgs) (*GetWorkerStatusResponse, error) {
|
||||
resp, err := c.Execute(OpGetWorkerStatus, args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var result GetWorkerStatusResponse
|
||||
if err := json.Unmarshal(resp.Data, &result); err != nil {
|
||||
return nil, fmt.Errorf("failed to unmarshal worker status response: %w", err)
|
||||
}
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// cleanupStaleDaemonArtifacts removes stale daemon.pid file when socket is missing and lock is free.
|
||||
// This prevents stale artifacts from accumulating after daemon crashes.
|
||||
// Only removes pid file - lock file is managed by OS (released on process exit).
|
||||
|
||||
Reference in New Issue
Block a user