controller

package
v0.0.0-...-4b2e221 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProvider

func GetProvider() (*golangsdk.ProviderClient, error)

Types

type AlarmValue

type AlarmValue struct {
	Time  int64   `json:"time"`
	Value float64 `json:"value"`
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(
	kubeClientSet kubernetes.Interface,
	rdsClientSet rdsv1alpha1clientset.Interface,
	namespace string,
	watchnamespaces string,
	logger log.Logger,
	recorder record.EventRecorder,
	refreshtime int,
) *Controller

func (*Controller) Create

func (c *Controller) Create(ctx context.Context, newRds *rdsv1alpha1.Rds) error

func (*Controller) CreateAlarm

func (c *Controller) CreateAlarm(instanceId string, smnEndpoint string, rdsName string, namespace string) error

func (*Controller) CreateSqlUser

func (c *Controller) CreateSqlUser(newRds *rdsv1alpha1.Rds) error

func (*Controller) Delete

func (c *Controller) Delete(newRds *rdsv1alpha1.Rds) error

func (*Controller) DeleteAlarm

func (c *Controller) DeleteAlarm(rdsName string, namespace string) error

func (*Controller) RdsFlavorLookup

func (c *Controller) RdsFlavorLookup(newRds *rdsv1alpha1.Rds, raisetype string) (string, error)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, numWorkers int) error

func (*Controller) SmnReceiver

func (c *Controller) SmnReceiver(ctx context.Context) error

func (*Controller) Update

func (c *Controller) Update(ctx context.Context, oldRds *rdsv1alpha1.Rds, newRds *rdsv1alpha1.Rds) error

func (*Controller) UpdateStatus

func (c *Controller) UpdateStatus(ctx context.Context, newRds *rdsv1alpha1.Rds) error

Update K8s RDS Resource

type Subscriber

type Subscriber struct {
	Subscribeurl     string `json:"subscribe_url"`
	Signature        string `json:"signature"`
	Topicurn         string `json:"topic_urn"`
	Messageid        string `json:"message_id"`
	Signatureversion string `json:"signature_version"`
	Type             string `json:"type"`
	Message          string `json:"message"`
	Signaturecerturl string `json:"signing_cert_url"`
	Timestamp        string `json:"timestamp"`
}

type SubscriberMessage

type SubscriberMessage struct {
	MessageType        string           `json:"message_type"`
	AlarmId            string           `json:"alarm_id"`
	AlarmName          string           `json:"alarm_name"`
	AlarmStatus        string           `json:"alarm_status"`
	Time               int64            `json:"time"`
	Namespace          string           `json:"namespace"`
	MetriyName         string           `json:"metric_name"`
	Dimension          string           `json:"dimension"`
	Period             int              `json:"period"`
	Filter             string           `json:"filter"`
	ComparisonOperator string           `json:"comparison_operator"`
	Value              int              `json:"value"`
	Unit               string           `json:"unit"`
	Count              int              `json:"count"`
	AlarmValue         []AlarmValue     `json:"alarmValue"`
	SmSContent         string           `json:"sms_content"`
	TemplateVariable   TemplateVariable `json:"template_variable"`
}

type TemplateVariable

type TemplateVariable struct {
	IsAlarm           bool   `json:"IsAlarm"`
	IsCycleTrigger    bool   `json:"IsCycleTrigger"`
	AlarmLevel        string `json:"AlarmLevel"`
	Region            string `json:"Region"`
	ResourceId        string `json:"ResourceId"`
	AlarmRule         string `json:"AlarmRule"`
	CurrentDate       string `json:"CurrentData"`
	AlarmTime         string `json:"AlarmTime"`
	DataPoint         string `json:"DataPoint"`
	DataPointTime     string `json:"DataPointTime"`
	AlarmRuleName     string `json:"AlarmRuleName"`
	AlarmId           string `json:"AlarmId"`
	AlarmDesc         string `json:"AlarmDesc"`
	MonitoringRange   string `json:"MonitoringRange"`
	IsOriginalValue   bool   `json:"IsOriginalValue"`
	Period            string `json:"Period"`
	Filter            string `json:"Filter"`
	ComparionOperator string `json:"ComparisonOperator"`
	Value             string `json:"Value"`
	Unit              string `json:"Unit"`
	Count             int    `json:"Count"`
	EventContent      string `json:"EventComntent"`
	IsIEC             bool   `json:"IsIEC"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL