data

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 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() (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"
)

Jump to

Keyboard shortcuts

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