The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/live/managedstream/cache.go

18 lines
690 B

package managedstream
import (
"context"
"encoding/json"
"github.com/grafana/grafana-plugin-sdk-go/data"
)
// FrameCache allows updating frame schema. Returns true is schema not changed.
type FrameCache interface {
// GetActiveChannels returns active managed stream channels with JSON schema.
GetActiveChannels(orgID int64) (map[string]json.RawMessage, error)
// GetFrame returns full JSON frame for a channel in org.
GetFrame(ctx context.Context, orgID int64, channel string) (json.RawMessage, bool, error)
// Update updates frame cache and returns true if schema changed.
Update(ctx context.Context, orgID int64, channel string, frameJson data.FrameJSONCache) (bool, error)
}