Documentation
¶
Index ¶
- Constants
- func Render(bundle Bundle) ([]byte, error)
- type Bundle
- type Dashboard
- type DateTimeOptions
- type OpenObserveClient
- type OpenObserveDashboard
- type OpenObservePanel
- type OpenObserveQuery
- type OpenObserveTab
- type Panel
- type PanelConfig
- type PanelFields
- type PanelFilter
- type PanelLayout
- type QueryConfig
- type ReconcileAction
- type ReconcilePlan
- type Variables
Constants ¶
View Source
const SchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bundle ¶
type Dashboard ¶
type Dashboard struct {
ID string `json:"id" yaml:"id"`
Title string `json:"title" yaml:"title"`
RefreshSeconds int `json:"refresh_seconds" yaml:"refresh_seconds"`
DefaultRange string `json:"default_range" yaml:"default_range"`
Owner string `json:"owner" yaml:"owner"`
Runbook string `json:"runbook" yaml:"runbook"`
Panels []Panel `json:"panels" yaml:"panels"`
}
type DateTimeOptions ¶
type OpenObserveClient ¶
type OpenObserveClient struct {
// contains filtered or unexported fields
}
func NewOpenObserveClient ¶
func NewOpenObserveClient(endpoint, username, password string) (*OpenObserveClient, error)
func (*OpenObserveClient) Apply ¶
func (c *OpenObserveClient) Apply(ctx context.Context, organization, folder string, desired []OpenObserveDashboard) (ReconcilePlan, error)
func (*OpenObserveClient) Plan ¶
func (c *OpenObserveClient) Plan(ctx context.Context, organization, folder string, desired []OpenObserveDashboard) (ReconcilePlan, error)
type OpenObserveDashboard ¶
type OpenObserveDashboard struct {
Version int `json:"version"`
DashboardID string `json:"dashboardId,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
Role string `json:"role"`
Owner string `json:"owner,omitempty"`
Tabs []OpenObserveTab `json:"tabs"`
Variables Variables `json:"variables"`
DefaultDatetimeDuration DateTimeOptions `json:"defaultDatetimeDuration"`
}
func RenderOpenObserve ¶
func RenderOpenObserve(bundle Bundle) ([]OpenObserveDashboard, error)
type OpenObservePanel ¶
type OpenObservePanel struct {
ID string `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Description string `json:"description"`
Config PanelConfig `json:"config"`
QueryType string `json:"queryType"`
Queries []OpenObserveQuery `json:"queries"`
Layout PanelLayout `json:"layout"`
}
type OpenObserveQuery ¶
type OpenObserveQuery struct {
Query string `json:"query"`
VRLFunctionQuery string `json:"vrlFunctionQuery"`
CustomQuery bool `json:"customQuery"`
Fields PanelFields `json:"fields"`
Config QueryConfig `json:"config"`
}
type OpenObserveTab ¶
type OpenObserveTab struct {
TabID string `json:"tabId"`
Name string `json:"name"`
Panels []OpenObservePanel `json:"panels"`
}
type Panel ¶
type PanelConfig ¶
type PanelFields ¶
type PanelFilter ¶
type PanelLayout ¶
type QueryConfig ¶
type ReconcileAction ¶
type ReconcileAction struct {
Kind string `json:"kind"`
Title string `json:"title"`
DashboardID string `json:"dashboard_id,omitempty"`
Hash string `json:"hash,omitempty"`
Desired *OpenObserveDashboard `json:"desired,omitempty"`
}
type ReconcilePlan ¶
type ReconcilePlan struct {
SchemaVersion int `json:"schema_version"`
State string `json:"state"`
Organization string `json:"organization"`
Folder string `json:"folder"`
Actions []ReconcileAction `json:"actions"`
}
Click to show internal directories.
Click to hide internal directories.