Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager, namespace string) error
- type DashboardPipeline
- type DashboardPipelineImpl
- type GrafanaClient
- type GrafanaClientImpl
- func (r *GrafanaClientImpl) CreateOrUpdateDashboard(dashboard []byte, folderId int64) (GrafanaResponse, error)
- func (r *GrafanaClientImpl) DeleteDashboardByUID(UID string) (GrafanaResponse, error)
- func (r *GrafanaClientImpl) GetOrCreateNamespaceFolder(namespace string) (GrafanaFolderResponse, error)
- type GrafanaFolderRequest
- type GrafanaFolderResponse
- type GrafanaRequest
- type GrafanaResponse
- type ReconcileGrafanaDashboard
Constants ¶
View Source
const ( DeleteDashboardByUIDUrl = "%v/api/dashboards/uid/%v" CreateOrUpdateDashboardUrl = "%v/api/dashboards/db" CreateOrUpdateFolderUrl = "%v/api/folders" )
View Source
const (
ControllerName = "controller_grafanadashboard"
)
View Source
const (
NonNamespacedFolderName = "Non-Namespaced"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DashboardPipeline ¶
type DashboardPipeline interface { ProcessDashboard(knownHash string) ([]byte, error) NewHash() string }
func NewDashboardPipeline ¶
func NewDashboardPipeline(client client.Client, dashboard *v1alpha1.GrafanaDashboard, fixAnnotations bool, fixHeights bool) DashboardPipeline
type DashboardPipelineImpl ¶
type DashboardPipelineImpl struct { Client client.Client 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, folderId int64) (GrafanaResponse, error) DeleteDashboardByUID(UID string) (GrafanaResponse, error) GetOrCreateNamespaceFolder(namespace string) (GrafanaFolderResponse, 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, folderId int64) (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
func (*GrafanaClientImpl) GetOrCreateNamespaceFolder ¶ added in v3.5.0
func (r *GrafanaClientImpl) GetOrCreateNamespaceFolder(namespace string) (GrafanaFolderResponse, error)
type GrafanaFolderRequest ¶ added in v3.5.0
type GrafanaFolderRequest struct {
Title string `json:"title"`
}
type GrafanaFolderResponse ¶ added in v3.5.0
type GrafanaRequest ¶
type GrafanaRequest struct { Dashboard json.RawMessage `json:"dashboard"` FolderId int64 `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.