Documentation ¶
Index ¶
- func ClusterNameFromURI(uri string) string
- func ConfigMapToFile(data string) (string, error)
- func Difference(a, b []string) []string
- func RunDeltaKusto(deltaCfgfile string) error
- type KustoCluster
- func (c *KustoCluster) AquireTargets(filter schemav1alpha1.TargetFilter) (schemav1alpha1.ClusterTargets, error)
- func (c *KustoCluster) CreateExecConfiguration(targets schemav1alpha1.ClusterTargets, cfgMap *v1.ConfigMap, ...) (schemav1alpha1.ExecutionConfiguration, error)
- func (c *KustoCluster) Execute(targets schemav1alpha1.ClusterTargets, ...) (schemav1alpha1.ClusterTargets, error)
- func (c *KustoCluster) ListDatabases(expression string) ([]string, error)
- type Query
- type Response
- type WebHookClient
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterNameFromURI ¶
ClusterNameFromURI returns the cluster name from the given URI
func ConfigMapToFile ¶
ConfigMapToFile stores the data given from the `ConfigMap` in a file TODO: rename?
func Difference ¶
Difference returns the elements in `a` that aren't in `b`.
func RunDeltaKusto ¶
RunDeltaKusto runs delta-kusto on the provided job configuration file.
Types ¶
type KustoCluster ¶
type KustoCluster struct { URI string Databases []string Client *kusto.Client // contains filtered or unexported fields }
KustoCluster represents a kusto cluster
func NewKustoCluster ¶
func NewKustoCluster(uri string) *KustoCluster
NewKustoCluster returns a new KustoCluster object with a client initialized
func (*KustoCluster) AquireTargets ¶
func (c *KustoCluster) AquireTargets(filter schemav1alpha1.TargetFilter) (schemav1alpha1.ClusterTargets, error)
AquireTargets filters the DBs in the cluster and matchs them with the filter to return DBs to execute on.
func (*KustoCluster) CreateExecConfiguration ¶
func (c *KustoCluster) CreateExecConfiguration(targets schemav1alpha1.ClusterTargets, cfgMap *v1.ConfigMap, failIfDataLoss bool) (schemav1alpha1.ExecutionConfiguration, error)
CreateExecConfiguration creates execution configuration for the given targets and `ConfigMap` configuration.
func (*KustoCluster) Execute ¶
func (c *KustoCluster) Execute(targets schemav1alpha1.ClusterTargets, config schemav1alpha1.ExecutionConfiguration) (schemav1alpha1.ClusterTargets, error)
Execute runs the `ExecutionConfiguration` on the provided targets
func (*KustoCluster) ListDatabases ¶
func (c *KustoCluster) ListDatabases(expression string) ([]string, error)
ListDatabases lists kusto databases matching the regexp expression.
type Response ¶
type Response struct {
DBS []string `json:"dbs"`
}
Response is the expected Webhook response
type WebHookClient ¶
WebHookClient holds the http client for the webhook
func NewWebHookClient ¶
func NewWebHookClient(httpClient *http.Client) *WebHookClient
NewWebHookClient creates a new `WebHookClient`
func (*WebHookClient) PerformQuery ¶
func (c *WebHookClient) PerformQuery(url, server, label string) ([]string, error)
PerformQuery calls the webhook with the provided parameters