event

package
v0.0.0-...-983f3f3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// microservice protocol used for REST endpoints, equivalent to HTTP/HTTPS.
	RestProtocol = "rest"
	// Istio label corresponding to id of original microservice instance before being converted to WorkloadEntry.
	InstanceIdLabel = "instanceId"
	// microservice endpoint query string that enables SSL.
	EnableSSL = "sslEnabled=true"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeEvent

type ChangeEvent struct {
	// Type of change event
	Action discovery.EventType
	// Event payload
	Event
}

type Event

type Event interface {
}

Common interface for convertable service and instance structs used by Service center and Istio APIs.

type InstanceEntry

type InstanceEntry struct {
	*discovery.MicroServiceInstance
}

func (*InstanceEntry) Convert

func (c *InstanceEntry) Convert() *WorkloadEntry

Convert a MicroServiceInstance to an Istio WorkloadEntry event.

type MicroserviceEntry

type MicroserviceEntry struct {
	// Microservice struct
	MicroService *discovery.MicroService
	// Instances of the MicroService
	Instances []*InstanceEntry
}

A Service center MicroService and its associated instance(s).

func (*MicroserviceEntry) Convert

func (c *MicroserviceEntry) Convert() *ServiceEntry

Convert a MicroService to an Istio ServiceEntry.

type ServiceEntry

type ServiceEntry struct {
	// An Istio ServiceEntry struct supported by the Istio client library.
	ServiceEntry *v1alpha3.ServiceEntry
	// WorkloadEntry(s) representing instances of the Istio ServiceEntry.
	WorkloadEntries []*WorkloadEntry
}

An Istio ServiceEntry and its associated WorkloadEntry(s).

func NewServiceEntry

func NewServiceEntry(curr *v1alpha3.ServiceEntry) *ServiceEntry

func (*ServiceEntry) Convert

func (s *ServiceEntry) Convert() *MicroserviceEntry

Convert an Istio ServiceEntry to a MicroService event

type WorkloadEntry

type WorkloadEntry struct {
	*istioAPI.WorkloadEntry
	// A subset of ports used by the WorkloadEntry's parent ServiceEntry.
	// Used in conjunction with other WorkloadEntry's ServicePorts to construct a complete set of the ServiceEntry's ports.
	ServicePorts []*istioAPI.Port
}

An Istio WorkloadEntry and the known ports of its parent ServiceEntry.

func (*WorkloadEntry) Convert

func (c *WorkloadEntry) Convert() *InstanceEntry

Convert an Istio WorkloadEntry to a service center Microservice Instance event.

Jump to

Keyboard shortcuts

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