-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathregistry.go
More file actions
28 lines (24 loc) · 940 Bytes
/
registry.go
File metadata and controls
28 lines (24 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package workers
import (
workerpb "go.temporal.io/api/worker/v1"
"go.temporal.io/server/common/namespace"
)
type (
// ListWorkersParams contains parameters for listing workers.
ListWorkersParams struct {
Query string
PageSize int
NextPageToken []byte // Opaque token from a previous response to resume pagination.
IncludeSystemWorkers bool
}
// ListWorkersResponse contains the result of listing workers.
ListWorkersResponse struct {
Workers []*workerpb.WorkerHeartbeat
NextPageToken []byte // Opaque token for the next page; nil if no more results.
}
Registry interface {
RecordWorkerHeartbeats(nsID namespace.ID, nsName namespace.Name, workerHeartbeat []*workerpb.WorkerHeartbeat)
ListWorkers(nsID namespace.ID, params ListWorkersParams) (ListWorkersResponse, error)
DescribeWorker(nsID namespace.ID, workerInstanceKey string) (*workerpb.WorkerHeartbeat, error)
}
)