mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? * Add implementation for DescribeWorker API (to both frontend and matching) * Add feature flag * Add all quotas/etc. * Add unit tests * Add functional tests ## Why? Part of worker commands work. Users should be able to directly get worker info for the worker they need. Corresponding API PR: https://github.com/temporalio/api/pull/622 ## How did you test it? - [X] add unit tests - [X] add functional tests ## Potential risks None, behind feature flag
15 lines
438 B
Go
15 lines
438 B
Go
package workers
|
|
|
|
import (
|
|
workerpb "go.temporal.io/api/worker/v1"
|
|
"go.temporal.io/server/common/namespace"
|
|
)
|
|
|
|
type (
|
|
Registry interface {
|
|
RecordWorkerHeartbeats(nsID namespace.ID, workerHeartbeat []*workerpb.WorkerHeartbeat)
|
|
ListWorkers(nsID namespace.ID, queue string, nextPageToken []byte) ([]*workerpb.WorkerHeartbeat, error)
|
|
DescribeWorker(nsID namespace.ID, workerInstanceKey string) (*workerpb.WorkerHeartbeat, error)
|
|
}
|
|
)
|