Documentation ¶
Index ¶
Constants ¶
View Source
const ( DeleteDashboardByUIDUrl = "%v/api/dashboards/uid/%v" CreateOrUpdateDashboardUrl = "%v/api/dashboards/db" )
View Source
const (
ControllerName = "controller_grafanadashboard"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DashboardPipeline ¶
type DashboardPipeline interface { ProcessDashboard(knownHash string) ([]byte, error) NewHash() string }
func NewDashboardPipeline ¶
func NewDashboardPipeline(dashboard *v1alpha1.GrafanaDashboard, fixAnnotations bool, fixHeights bool) DashboardPipeline
type DashboardPipelineImpl ¶
type DashboardPipelineImpl struct { Dashboard *v1alpha1.GrafanaDashboard JSON string Board map[string]interface{} Logger logr.Logger Hash string FixAnnotations bool FixHeights bool }
func (*DashboardPipelineImpl) NewHash ¶
func (r *DashboardPipelineImpl) NewHash() string
func (*DashboardPipelineImpl) ProcessDashboard ¶
func (r *DashboardPipelineImpl) ProcessDashboard(knownHash string) ([]byte, error)
type GrafanaClient ¶
type GrafanaClient interface { CreateOrUpdateDashboard(dashboard []byte) (GrafanaResponse, error) DeleteDashboardByUID(UID string) (GrafanaResponse, error) }
func NewGrafanaClient ¶
func NewGrafanaClient(url, user, password string, timeoutSeconds time.Duration) GrafanaClient
type GrafanaClientImpl ¶
type GrafanaClientImpl struct {
// contains filtered or unexported fields
}
func (*GrafanaClientImpl) CreateOrUpdateDashboard ¶
func (r *GrafanaClientImpl) CreateOrUpdateDashboard(dashboard []byte) (GrafanaResponse, error)
Submit dashboard json to grafana
func (*GrafanaClientImpl) DeleteDashboardByUID ¶
func (r *GrafanaClientImpl) DeleteDashboardByUID(UID string) (GrafanaResponse, error)
Delete a dashboard given by a UID
type GrafanaRequest ¶
type GrafanaRequest struct { Dashboard json.RawMessage `json:"dashboard"` FolderId int `json:"folderId"` Overwrite bool `json:"overwrite"` }
type GrafanaResponse ¶
type ReconcileGrafanaDashboard ¶
type ReconcileGrafanaDashboard struct {
// contains filtered or unexported fields
}
ReconcileGrafanaDashboard reconciles a GrafanaDashboard object
Click to show internal directories.
Click to hide internal directories.