event

package
v0.0.0-...-0137e5c Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_SELECT_BEFORE_INSERT_QUERY = "SELECT name FROM event WHERE uid = $1 and reason = $2 and first_timestamp = $3"
	EVENT_INSERT_QUERY               = "INSERT INTO event (namespace, kind, name, uid, apiversion, fieldpath, action, reason, note, reporting_controller, reporting_instance, host, count, type, first_timestamp, last_timestamp)" +
		" VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)"
		//" ON CONFLICT (uid, reason, first_timestamp) DO UPDATE SET last_timestamp = $16, count = $13"
	// EVENT_UPDATE_QUERY = "UPDATE event SET last_timestamp = $1, count = $2 WHERE uid = $3 and first_timestamp = $4 and reason = $5"
	EVENT_DELETE_QUERY = "DELETE FROM event WHERE uid = $1 and first_timestamp = $2 and reason = $3"
)

Variables

This section is empty.

Functions

func DeleteEvent

func DeleteEvent(e *eventv1.Event) error

func GetEventDataFromDB

func GetEventDataFromDB(query string) ([]eventv1.Event, error)

func Insert

func Insert(e *eventv1.Event)

func InsertNewEvent

func InsertNewEvent(e *eventv1.Event) error

func SelectBeforeInsert

func SelectBeforeInsert(uid string, reason string, firstTime time.Time) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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