MCPcopy Create free account
hub / github.com/PostHog/duckgres / Worker

Method Worker

controlplane/worker_mgr.go:630–635  ·  view source on GitHub ↗

Worker returns a worker by ID.

(id int)

Source from the content-addressed store, hash-verified

628var doHealthCheckWithMetadata = doHealthCheckWithMetadataImpl
629
630func doHealthCheckWithMetadataImpl(ctx context.Context, client *flightsql.Client, payload server.WorkerHealthCheckPayload) (*healthCheckResult, error) {
631 body, _ := json.Marshal(payload)
632
633 // Use the underlying flight client for custom actions.
634 // flightsql.Client.Client is a flight.Client interface which embeds
635 // FlightServiceClient, giving us access to DoAction directly.
636 stream, err := client.Client.DoAction(ctx, &flight.Action{Type: "HealthCheck", Body: body})
637 if err != nil {
638 return nil, fmt.Errorf("health check action: %w", err)

Calls

no outgoing calls