Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListWorkersParams ¶
type ListWorkersParams struct {
Query string
PageSize int
NextPageToken []byte // Opaque token from a previous response to resume pagination.
}
ListWorkersParams contains parameters for listing workers.
type ListWorkersResponse ¶
type ListWorkersResponse struct {
Workers []*workerpb.WorkerHeartbeat
NextPageToken []byte // Opaque token for the next page; nil if no more results.
}
ListWorkersResponse contains the result of listing workers.
type Registry ¶
type 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)
}
func NewRegistry ¶
func NewRegistry(lc fx.Lifecycle, params RegistryParams) Registry
NewRegistry creates a workers heartbeat registry with the given parameters.
type RegistryParams ¶
type RegistryParams struct {
NumBuckets dynamicconfig.IntPropertyFn
TTL dynamicconfig.DurationPropertyFn
MinEvictAge dynamicconfig.DurationPropertyFn
MaxItems dynamicconfig.IntPropertyFn
EvictionInterval dynamicconfig.DurationPropertyFn
MetricsHandler metrics.Handler
MetricsConfig WorkerMetricsConfig
}
RegistryParams contains all parameters for creating a worker registry.
type WorkerHeartbeatPropertyFunc ¶
type WorkerHeartbeatPropertyFunc func(*workerpb.WorkerHeartbeat) string
type WorkerMetricsConfig ¶
type WorkerMetricsConfig struct {
EnablePluginMetrics dynamicconfig.BoolPropertyFn
EnablePollerAutoscalingMetrics dynamicconfig.BoolPropertyFn
BreakdownMetricsByTaskQueue dynamicconfig.BoolPropertyFnWithTaskQueueFilter
ExternalPayloadsEnabled dynamicconfig.BoolPropertyFnWithNamespaceFilter
}
WorkerMetricsConfig contains dynamic config flags for worker-related metrics.
Click to show internal directories.
Click to hide internal directories.