events

package
v4.3.0-beta.3+incompat... Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTopicAll       = "alltopic"
	EventTopicCluster   = "clustertopic"
	EventTopicBackup    = "backuptopic"
	EventTopicLoad      = "loadtopic"
	EventTopicUser      = "postgresusertopic"
	EventTopicPolicy    = "policytopic"
	EventTopicPgbouncer = "pgbouncertopic"
	EventTopicPGO       = "pgotopic"
	EventTopicPGOUser   = "pgousertopic"
	EventTopicUpgrade   = "upgradetopic"
)
View Source
const (
	EventReloadCluster                 = "ReloadCluster"
	EventPrimaryNotReady               = "PrimaryNotReady"
	EventPrimaryDeleted                = "PrimaryDeleted"
	EventCloneCluster                  = "CloneCluster"
	EventCloneClusterCompleted         = "CloneClusterCompleted"
	EventCloneClusterFailure           = "CloneClusterFailure"
	EventCreateCluster                 = "CreateCluster"
	EventCreateClusterCompleted        = "CreateClusterCompleted"
	EventCreateClusterFailure          = "CreateClusterFailure"
	EventScaleCluster                  = "ScaleCluster"
	EventScaleClusterFailure           = "ScaleClusterFailure"
	EventScaleDownCluster              = "ScaleDownCluster"
	EventShutdownCluster               = "ShutdownCluster"
	EventFailoverCluster               = "FailoverCluster"
	EventFailoverClusterCompleted      = "FailoverClusterCompleted"
	EventRestoreCluster                = "RestoreCluster"
	EventRestoreClusterCompleted       = "RestoreClusterCompleted"
	EventUpgradeCluster                = "UpgradeCluster"
	EventUpgradeClusterCreateSubmitted = "UpgradeClusterCreateSubmitted"
	EventUpgradeClusterFailure         = "UpgradeClusterFailure"
	EventDeleteCluster                 = "DeleteCluster"
	EventDeleteClusterCompleted        = "DeleteClusterCompleted"
	EventCreateLabel                   = "CreateLabel"
	EventLoad                          = "Load"
	EventLoadCompleted                 = "LoadCompleted"

	EventCreateBackup          = "CreateBackup"
	EventCreateBackupCompleted = "CreateBackupCompleted"

	EventCreatePolicy = "CreatePolicy"
	EventApplyPolicy  = "ApplyPolicy"
	EventDeletePolicy = "DeletePolicy"

	EventCreatePgbouncer = "CreatePgbouncer"
	EventDeletePgbouncer = "DeletePgbouncer"
	EventUpdatePgbouncer = "UpdatePgbouncer"

	EventPGOCreateUser      = "PGOCreateUser"
	EventPGOUpdateUser      = "PGOUpdateUser"
	EventPGODeleteUser      = "PGODeleteUser"
	EventPGOCreateRole      = "PGOCreateRole"
	EventPGOUpdateRole      = "PGOUpdateRole"
	EventPGODeleteRole      = "PGODeleteRole"
	EventPGOStart           = "PGOStart"
	EventPGOStop            = "PGOStop"
	EventPGOUpdateConfig    = "PGOUpdateConfig"
	EventPGODeleteNamespace = "PGODeleteNamespace"
	EventPGOCreateNamespace = "PGOCreateNamespace"

	EventStandbyEnabled  = "StandbyEnabled"
	EventStandbyDisabled = "StandbyDisabled"
)

Variables

This section is empty.

Functions

func Publish

func Publish(e EventInterface) error

String returns the string form for a given LogLevel

Types

type EventApplyPolicyFormat

type EventApplyPolicyFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Policyname  string `json:"policyname"`
}

----------------------------

func (EventApplyPolicyFormat) GetHeader

func (p EventApplyPolicyFormat) GetHeader() EventHeader

func (EventApplyPolicyFormat) String

func (lvl EventApplyPolicyFormat) String() string

type EventCloneClusterCompletedFormat

type EventCloneClusterCompletedFormat struct {
	EventHeader       `json:"eventheader"`
	SourceClusterName string `json:"sourceClusterName"`
	TargetClusterName string `json:"targetClusterName"`
	WorkflowID        string `json:"workflowid"`
}

----------------------------

func (EventCloneClusterCompletedFormat) GetHeader

func (EventCloneClusterCompletedFormat) String

type EventCloneClusterFailureFormat

type EventCloneClusterFailureFormat struct {
	EventHeader       `json:"eventheader"`
	SourceClusterName string `json:"sourceClusterName"`
	TargetClusterName string `json:"targetClusterName"`
	ErrorMessage      string `json:"errormessage"`
	WorkflowID        string `json:"workflowid"`
}

----------------------------

func (EventCloneClusterFailureFormat) GetHeader

func (EventCloneClusterFailureFormat) String

type EventCloneClusterFormat

type EventCloneClusterFormat struct {
	EventHeader       `json:"eventheader"`
	SourceClusterName string `json:"sourceClusterName"`
	TargetClusterName string `json:"targetClusterName"`
	WorkflowID        string `json:"workflowid"`
}

----------------------------

func (EventCloneClusterFormat) GetHeader

func (p EventCloneClusterFormat) GetHeader() EventHeader

func (EventCloneClusterFormat) String

func (lvl EventCloneClusterFormat) String() string

type EventClusterShutdownFormat

type EventClusterShutdownFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventClusterShutdownFormat) GetHeader

func (EventClusterShutdownFormat) String

func (lvl EventClusterShutdownFormat) String() string

type EventCreateBackupCompletedFormat

type EventCreateBackupCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	BackupType  string `json:"backuptype"`
	Path        string `json:"path"`
}

----------------------------

func (EventCreateBackupCompletedFormat) GetHeader

func (EventCreateBackupCompletedFormat) String

type EventCreateBackupFormat

type EventCreateBackupFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	BackupType  string `json:"backuptype"`
}

----------------------------

func (EventCreateBackupFormat) GetHeader

func (p EventCreateBackupFormat) GetHeader() EventHeader

func (EventCreateBackupFormat) String

func (lvl EventCreateBackupFormat) String() string

type EventCreateClusterCompletedFormat

type EventCreateClusterCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	WorkflowID  string `json:"workflowid"`
}

----------------------------

func (EventCreateClusterCompletedFormat) GetHeader

func (EventCreateClusterCompletedFormat) String

type EventCreateClusterFailureFormat

type EventCreateClusterFailureFormat struct {
	EventHeader  `json:"eventheader"`
	Clustername  string `json:"clustername"`
	ErrorMessage string `json:"errormessage"`
	WorkflowID   string `json:"workflowid"`
}

----------------------------

func (EventCreateClusterFailureFormat) GetHeader

func (EventCreateClusterFailureFormat) String

type EventCreateClusterFormat

type EventCreateClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	WorkflowID  string `json:"workflowid"`
}

----------------------------

func (EventCreateClusterFormat) GetHeader

func (p EventCreateClusterFormat) GetHeader() EventHeader

func (EventCreateClusterFormat) String

func (lvl EventCreateClusterFormat) String() string

type EventCreateLabelFormat

type EventCreateLabelFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Label       string `json:"label"`
}

----------------------------

func (EventCreateLabelFormat) GetHeader

func (p EventCreateLabelFormat) GetHeader() EventHeader

func (EventCreateLabelFormat) String

func (lvl EventCreateLabelFormat) String() string

type EventCreatePgbouncerFormat

type EventCreatePgbouncerFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventCreatePgbouncerFormat) GetHeader

func (EventCreatePgbouncerFormat) String

func (lvl EventCreatePgbouncerFormat) String() string

type EventCreatePolicyFormat

type EventCreatePolicyFormat struct {
	EventHeader `json:"eventheader"`
	Policyname  string `json:"policyname"`
}

----------------------------

func (EventCreatePolicyFormat) GetHeader

func (p EventCreatePolicyFormat) GetHeader() EventHeader

func (EventCreatePolicyFormat) String

func (lvl EventCreatePolicyFormat) String() string

type EventDeleteClusterCompletedFormat

type EventDeleteClusterCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventDeleteClusterCompletedFormat) GetHeader

func (EventDeleteClusterCompletedFormat) String

type EventDeleteClusterFormat

type EventDeleteClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventDeleteClusterFormat) GetHeader

func (p EventDeleteClusterFormat) GetHeader() EventHeader

func (EventDeleteClusterFormat) String

func (lvl EventDeleteClusterFormat) String() string

type EventDeletePgbouncerFormat

type EventDeletePgbouncerFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventDeletePgbouncerFormat) GetHeader

func (EventDeletePgbouncerFormat) String

func (lvl EventDeletePgbouncerFormat) String() string

type EventDeletePolicyFormat

type EventDeletePolicyFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Policyname  string `json:"policyname"`
}

----------------------------

func (EventDeletePolicyFormat) GetHeader

func (p EventDeletePolicyFormat) GetHeader() EventHeader

func (EventDeletePolicyFormat) String

func (lvl EventDeletePolicyFormat) String() string

type EventFailoverClusterCompletedFormat

type EventFailoverClusterCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Target      string `json:"target"`
}

----------------------------

func (EventFailoverClusterCompletedFormat) GetHeader

func (EventFailoverClusterCompletedFormat) String

type EventFailoverClusterFormat

type EventFailoverClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Target      string `json:"target"`
}

----------------------------

func (EventFailoverClusterFormat) GetHeader

func (EventFailoverClusterFormat) String

func (lvl EventFailoverClusterFormat) String() string

type EventHeader

type EventHeader struct {
	EventType string    `json:eventtype`
	Namespace string    `json:"namespace"`
	Username  string    `json:"username"`
	Timestamp time.Time `json:"timestamp"`
	Topic     []string  `json:"topic"`
}

func (EventHeader) String

func (lvl EventHeader) String() string

type EventInterface

type EventInterface interface {
	GetHeader() EventHeader
	String() string
}

type EventLoadCompletedFormat

type EventLoadCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Loadconfig  string `json:"loadconfig"`
}

----------------------------

func (EventLoadCompletedFormat) GetHeader

func (p EventLoadCompletedFormat) GetHeader() EventHeader

func (EventLoadCompletedFormat) String

func (lvl EventLoadCompletedFormat) String() string

type EventLoadFormat

type EventLoadFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Loadconfig  string `json:"loadconfig"`
}

----------------------------

func (EventLoadFormat) GetHeader

func (p EventLoadFormat) GetHeader() EventHeader

func (EventLoadFormat) String

func (lvl EventLoadFormat) String() string

type EventPGOCreateNamespaceFormat

type EventPGOCreateNamespaceFormat struct {
	EventHeader      `json:"eventheader"`
	CreatedNamespace string `json:"creatednamespace"`
}

--------

func (EventPGOCreateNamespaceFormat) GetHeader

func (EventPGOCreateNamespaceFormat) String

type EventPGOCreateRoleFormat

type EventPGOCreateRoleFormat struct {
	EventHeader     `json:"eventheader"`
	CreatedRolename string `json:"createdrolename"`
}

--------

func (EventPGOCreateRoleFormat) GetHeader

func (p EventPGOCreateRoleFormat) GetHeader() EventHeader

func (EventPGOCreateRoleFormat) String

func (lvl EventPGOCreateRoleFormat) String() string

type EventPGOCreateUserFormat

type EventPGOCreateUserFormat struct {
	EventHeader     `json:"eventheader"`
	CreatedUsername string `json:"createdusername"`
}

--------

func (EventPGOCreateUserFormat) GetHeader

func (p EventPGOCreateUserFormat) GetHeader() EventHeader

func (EventPGOCreateUserFormat) String

func (lvl EventPGOCreateUserFormat) String() string

type EventPGODeleteNamespaceFormat

type EventPGODeleteNamespaceFormat struct {
	EventHeader      `json:"eventheader"`
	DeletedNamespace string `json:"deletednamespace"`
}

--------

func (EventPGODeleteNamespaceFormat) GetHeader

func (EventPGODeleteNamespaceFormat) String

type EventPGODeleteRoleFormat

type EventPGODeleteRoleFormat struct {
	EventHeader     `json:"eventheader"`
	DeletedRolename string `json:"deletedRolename"`
}

--------

func (EventPGODeleteRoleFormat) GetHeader

func (p EventPGODeleteRoleFormat) GetHeader() EventHeader

func (EventPGODeleteRoleFormat) String

func (lvl EventPGODeleteRoleFormat) String() string

type EventPGODeleteUserFormat

type EventPGODeleteUserFormat struct {
	EventHeader     `json:"eventheader"`
	DeletedUsername string `json:"deletedusername"`
}

--------

func (EventPGODeleteUserFormat) GetHeader

func (p EventPGODeleteUserFormat) GetHeader() EventHeader

func (EventPGODeleteUserFormat) String

func (lvl EventPGODeleteUserFormat) String() string

type EventPGOStartFormat

type EventPGOStartFormat struct {
	EventHeader `json:"eventheader"`
}

--------

func (EventPGOStartFormat) GetHeader

func (p EventPGOStartFormat) GetHeader() EventHeader

func (EventPGOStartFormat) String

func (lvl EventPGOStartFormat) String() string

type EventPGOStopFormat

type EventPGOStopFormat struct {
	EventHeader `json:"eventheader"`
}

--------

func (EventPGOStopFormat) GetHeader

func (p EventPGOStopFormat) GetHeader() EventHeader

func (EventPGOStopFormat) String

func (lvl EventPGOStopFormat) String() string

type EventPGOUpdateConfigFormat

type EventPGOUpdateConfigFormat struct {
	EventHeader `json:"eventheader"`
}

--------

func (EventPGOUpdateConfigFormat) GetHeader

func (EventPGOUpdateConfigFormat) String

func (lvl EventPGOUpdateConfigFormat) String() string

type EventPGOUpdateRoleFormat

type EventPGOUpdateRoleFormat struct {
	EventHeader     `json:"eventheader"`
	UpdatedRolename string `json:"updatedrolename"`
}

--------

func (EventPGOUpdateRoleFormat) GetHeader

func (p EventPGOUpdateRoleFormat) GetHeader() EventHeader

func (EventPGOUpdateRoleFormat) String

func (lvl EventPGOUpdateRoleFormat) String() string

type EventPGOUpdateUserFormat

type EventPGOUpdateUserFormat struct {
	EventHeader     `json:"eventheader"`
	UpdatedUsername string `json:"updatedusername"`
}

--------

func (EventPGOUpdateUserFormat) GetHeader

func (p EventPGOUpdateUserFormat) GetHeader() EventHeader

func (EventPGOUpdateUserFormat) String

func (lvl EventPGOUpdateUserFormat) String() string

type EventPrimaryDeletedFormat

type EventPrimaryDeletedFormat struct {
	EventHeader    `json:"eventheader"`
	Clustername    string `json:"clustername"`
	Deploymentname string `json:"deploymentname"`
}

----------------------------

func (EventPrimaryDeletedFormat) GetHeader

func (p EventPrimaryDeletedFormat) GetHeader() EventHeader

func (EventPrimaryDeletedFormat) String

func (lvl EventPrimaryDeletedFormat) String() string

type EventPrimaryNotReadyFormat

type EventPrimaryNotReadyFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventPrimaryNotReadyFormat) GetHeader

func (EventPrimaryNotReadyFormat) String

func (lvl EventPrimaryNotReadyFormat) String() string

type EventReloadClusterFormat

type EventReloadClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

--------

func (EventReloadClusterFormat) GetHeader

func (p EventReloadClusterFormat) GetHeader() EventHeader

func (EventReloadClusterFormat) String

func (lvl EventReloadClusterFormat) String() string

type EventRestoreClusterCompletedFormat

type EventRestoreClusterCompletedFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventRestoreClusterCompletedFormat) GetHeader

func (EventRestoreClusterCompletedFormat) String

type EventRestoreClusterFormat

type EventRestoreClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventRestoreClusterFormat) GetHeader

func (p EventRestoreClusterFormat) GetHeader() EventHeader

func (EventRestoreClusterFormat) String

func (lvl EventRestoreClusterFormat) String() string

type EventScaleClusterFailureFormat

type EventScaleClusterFailureFormat struct {
	EventHeader  `json:"eventheader"`
	Clustername  string `json:"clustername"`
	Replicaname  string `json:"replicaname"`
	ErrorMessage string `json:"errormessage"`
}

----------------------------

func (EventScaleClusterFailureFormat) GetHeader

func (EventScaleClusterFailureFormat) String

type EventScaleClusterFormat

type EventScaleClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Replicaname string `json:"replicaname"`
}

----------------------------

func (EventScaleClusterFormat) GetHeader

func (p EventScaleClusterFormat) GetHeader() EventHeader

func (EventScaleClusterFormat) String

func (lvl EventScaleClusterFormat) String() string

type EventScaleDownClusterFormat

type EventScaleDownClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	Replicaname string `json:"replicaname"`
}

----------------------------

func (EventScaleDownClusterFormat) GetHeader

func (EventScaleDownClusterFormat) String

func (lvl EventScaleDownClusterFormat) String() string

type EventShutdownClusterFormat

type EventShutdownClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventShutdownClusterFormat) GetHeader

func (EventShutdownClusterFormat) String

func (lvl EventShutdownClusterFormat) String() string

type EventStandbyDisabledFormat

type EventStandbyDisabledFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventStandbyDisabledFormat) GetHeader

func (EventStandbyDisabledFormat) String

func (lvl EventStandbyDisabledFormat) String() string

type EventStandbyEnabledFormat

type EventStandbyEnabledFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventStandbyEnabledFormat) GetHeader

func (p EventStandbyEnabledFormat) GetHeader() EventHeader

func (EventStandbyEnabledFormat) String

func (lvl EventStandbyEnabledFormat) String() string

type EventUpdatePgbouncerFormat

type EventUpdatePgbouncerFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
}

----------------------------

func (EventUpdatePgbouncerFormat) GetHeader

func (EventUpdatePgbouncerFormat) String

func (lvl EventUpdatePgbouncerFormat) String() string

type EventUpgradeClusterCreateFormat

type EventUpgradeClusterCreateFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	WorkflowID  string `json:"workflowid"`
}

----------------------------

func (EventUpgradeClusterCreateFormat) GetHeader

func (EventUpgradeClusterCreateFormat) String

type EventUpgradeClusterFailureFormat

type EventUpgradeClusterFailureFormat struct {
	EventHeader  `json:"eventheader"`
	Clustername  string `json:"clustername"`
	WorkflowID   string `json:"workflowid"`
	ErrorMessage string `json:"errormessage"`
}

----------------------------

func (EventUpgradeClusterFailureFormat) GetHeader

func (EventUpgradeClusterFailureFormat) String

type EventUpgradeClusterFormat

type EventUpgradeClusterFormat struct {
	EventHeader `json:"eventheader"`
	Clustername string `json:"clustername"`
	WorkflowID  string `json:"workflowid"`
}

----------------------------

func (EventUpgradeClusterFormat) GetHeader

func (p EventUpgradeClusterFormat) GetHeader() EventHeader

func (EventUpgradeClusterFormat) String

func (lvl EventUpgradeClusterFormat) String() string

Jump to

Keyboard shortcuts

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