data

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// CreateOption is the option of create
	CreateOption = iota
	// DeleteOption is the option of delete
	DeleteOption
	// UpdateOption is the option of update
	UpdateOption
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ResourceType ResourceType `json:"resource_type"`
	Option       int          `json:"option"`
	OldValue     interface{}  `json:"old_value"`
	Value        interface{}  `json:"value"`
}

Event is the event of adc

func (*Event) Apply

func (e *Event) Apply(cluster apisix.Cluster) error

func (*Event) Output

func (e *Event) Output(diffOnly bool) (string, error)

Output returns the output of event, if the event is create, it will return the message of creating resource. if the event is update, it will return the diff of old value and new value. if the event is delete, it will return the message of deleting resource.

type ResourceType

type ResourceType string

ResourceType is the type of resource

var (
	// ServiceResourceType is the resource type of service
	ServiceResourceType ResourceType = "service"
	// RouteResourceType is the resource type of route
	RouteResourceType ResourceType = "route"
	// ConsumerResourceType is the resource type of consumer
	ConsumerResourceType ResourceType = "consumer"
	// SSLResourceType is the resource type of SSL
	SSLResourceType ResourceType = "ssl"
	// GlobalRuleResourceType is the resource type of global rule
	GlobalRuleResourceType ResourceType = "global_rule"
	// PluginConfigResourceType is the resource type of plugin config
	PluginConfigResourceType ResourceType = "plugin_config"
	// ConsumerGroupResourceType is the resource type of consumer group
	ConsumerGroupResourceType ResourceType = "consumer_group"
	// PluginMetadataResourceType is the resource type of consumer group
	PluginMetadataResourceType ResourceType = "plugin_metadata"
	// StreamRouteResourceType is the resource type of stream route
	StreamRouteResourceType ResourceType = "stream_route"
	// UpstreamResourceType is the resource type of upstream
	UpstreamResourceType ResourceType = "upstream"
)

Jump to

Keyboard shortcuts

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