Documentation
¶
Overview ¶
Package debug drives a Cardinal shard's tick controls over DebugService. It lives here rather than in the debugger command because the log viewer runs the same operations from its hotkeys — one definition means a hotkey and `world debug <op>` cannot diverge.
Index ¶
- Constants
- func NewClient(url string) cardinalv1connect.DebugServiceClient
- func Pause(ctx context.Context, client cardinalv1connect.DebugServiceClient, ...) (string, error)
- func Reset(ctx context.Context, client cardinalv1connect.DebugServiceClient, ...) (string, error)
- func Resume(ctx context.Context, client cardinalv1connect.DebugServiceClient, ...) (string, error)
- func Step(ctx context.Context, client cardinalv1connect.DebugServiceClient, ...) (string, error)
- type Action
Constants ¶
View Source
const ClientTimeout = 30 * time.Second
ClientTimeout bounds a single debug RPC.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(url string) cardinalv1connect.DebugServiceClient
NewClient dials a shard instance's DebugService. It is unauthenticated in dev, so there is no sign-in step.
func Pause ¶
func Pause( ctx context.Context, client cardinalv1connect.DebugServiceClient, instanceID string, ) (string, error)
Pause stops an instance from ticking.
func Reset ¶
func Reset( ctx context.Context, client cardinalv1connect.DebugServiceClient, instanceID string, ) (string, error)
Reset clears an instance, pausing it first if necessary.
func Resume ¶
func Resume( ctx context.Context, client cardinalv1connect.DebugServiceClient, instanceID string, ) (string, error)
Resume starts a paused instance ticking again.
func Step ¶
func Step( ctx context.Context, client cardinalv1connect.DebugServiceClient, instanceID string, ) (string, error)
Step advances an instance by one tick, pausing it first if necessary.
Types ¶
type Action ¶
type Action func( ctx context.Context, client cardinalv1connect.DebugServiceClient, instanceID string, ) (string, error)
Action applies one debug operation to an instance.
Click to show internal directories.
Click to hide internal directories.