Documentation
¶
Overview ¶
Package restsource implements adapter.Source for HTTP/JSON endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RESTSource ¶
type RESTSource struct {
// contains filtered or unexported fields
}
RESTSource polls a single HTTP endpoint and extracts stage metrics via gjson selectors.
func NewRESTSource ¶
func NewRESTSource(cfg adapter.SourceConfig, logger *slog.Logger) (*RESTSource, error)
NewRESTSource creates a RESTSource from a SourceConfig.
func (*RESTSource) Close ¶
func (r *RESTSource) Close() error
Close releases resources. RESTSource uses a standard http.Client which doesn't require explicit cleanup.
func (*RESTSource) Poll ¶
func (r *RESTSource) Poll(ctx context.Context) (map[string]adapter.StageMetrics, error)
Poll fetches the endpoint and extracts stage metrics.
Click to show internal directories.
Click to hide internal directories.