eventapi

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESOURCE_EVENT_TYPE_CREATE       = "create"
	RESOURCE_EVENT_TYPE_DELETE       = "delete"
	RESOURCE_EVENT_TYPE_UPDATE_STATE = "update-state"
	RESOURCE_EVENT_TYPE_MIGRATE      = "migrate"
	RESOURCE_EVENT_TYPE_RECREATE     = "recreate"
	RESOURCE_EVENT_TYPE_ADD_IP       = "add-ip"
	RESOURCE_EVENT_TYPE_REMOVE_IP    = "remove-ip"
)

Variables

This section is empty.

Functions

func ReleaseResourceEvent

func ReleaseResourceEvent(event *ResourceEvent)

Types

type ResourceEvent

type ResourceEvent struct {
	Time               int64
	TimeMilli          int64 // record millisecond time for debug
	Type               string
	InstanceType       uint32 // the value is the same as l3_device_type
	InstanceID         uint32
	InstanceName       string
	AttributeSubnetIDs []uint32
	AttributeIPs       []string
	Description        string
	GProcessID         uint32 // if this value is set, InstanceType and InstanceID are empty
	GProcessName       string // if this value is set, InstanceName is empty

	IfNeedTagged bool // if need ingester set tag
	RegionID     uint32
	AZID         uint32
	VPCID        uint32
	L3DeviceType uint32
	L3DeviceID   uint32
	HostID       uint32
	PodClusterID uint32
	PodNSID      uint32
	PodNodeID    uint32
	PodServiceID uint32
	PodGroupID   uint32
	PodGroupType uint8
	PodID        uint32
	SubnetID     uint32
	IP           string

	ORGID  uint16
	TeamID uint16
}

func AcquireResourceEvent

func AcquireResourceEvent() *ResourceEvent

func (*ResourceEvent) Release

func (r *ResourceEvent) Release()

type TagFieldOption

type TagFieldOption func(opts *ResourceEvent)

func TagAZID

func TagAZID(id int) TagFieldOption

func TagAttributeIPs

func TagAttributeIPs(ips []string) TagFieldOption

func TagAttributeSubnetIDs

func TagAttributeSubnetIDs(netIDs []uint32) TagFieldOption

func TagDescription

func TagDescription(description string) TagFieldOption

func TagHostID

func TagHostID(id int) TagFieldOption

func TagIP

func TagIP(ip string) TagFieldOption

func TagL3DeviceID

func TagL3DeviceID(id int) TagFieldOption

func TagL3DeviceType

func TagL3DeviceType(id int) TagFieldOption

func TagPodClusterID

func TagPodClusterID(id int) TagFieldOption

func TagPodGroupID

func TagPodGroupID(id int) TagFieldOption

func TagPodGroupType

func TagPodGroupType(t uint32) TagFieldOption

func TagPodID

func TagPodID(id int) TagFieldOption

func TagPodNSID

func TagPodNSID(id int) TagFieldOption

func TagPodNodeID

func TagPodNodeID(id int) TagFieldOption

func TagPodServiceID

func TagPodServiceID(id int) TagFieldOption

func TagRegionID

func TagRegionID(id int) TagFieldOption

func TagSubnetID

func TagSubnetID(id uint32) TagFieldOption

func TagVPCID

func TagVPCID(id int) TagFieldOption

Jump to

Keyboard shortcuts

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