Documentation ¶
Index ¶
- Constants
- Variables
- type CertFunc
- type Event
- type HTTPRouteGroupSpecFunc
- type HTTPRouteGroupSpecsFunc
- type Informer
- type IngressSpecFunc
- type IngressSpecsFunc
- type ServiceCanariesFunc
- type ServiceCanarySpecFunc
- type ServiceCertsFunc
- type ServiceInstanceSpecsFunc
- type ServiceInstanceStatusFunc
- type ServiceInstanceStatusesFunc
- type ServiceSpecFunc
- type ServiceSpecsFunc
- type ServicesInstanceSpecFunc
- type TenantSpecFunc
- type TenantSpecsFunc
- type TrafficTargetSpecFunc
- type TrafficTargetSpecsFunc
Constants ¶
const ( // EventUpdate is the update inform event. EventUpdate = "Update" // EventDelete is the delete inform event. EventDelete = "Delete" )
Variables ¶
var ( // ErrAlreadyWatched is the error when watch the same entry again. ErrAlreadyWatched = fmt.Errorf("already watched") // ErrClosed is the error when watching a closed informer. ErrClosed = fmt.Errorf("informer already been closed") // ErrNotFound is the error when watching an entry which is not found. ErrNotFound = fmt.Errorf("not found") )
Functions ¶
This section is empty.
Types ¶
type CertFunc ¶ added in v1.3.1
type CertFunc func(event Event, value *spec.Certificate) bool
CertFunc is the callback function type for service/ingressController's cert.
type HTTPRouteGroupSpecFunc ¶ added in v1.3.2
type HTTPRouteGroupSpecFunc func(event Event, value *spec.HTTPRouteGroup) bool
HTTPRouteGroupSpecFunc is the callback function type for HTTP route group spec.
type HTTPRouteGroupSpecsFunc ¶ added in v1.3.2
type HTTPRouteGroupSpecsFunc func(value map[string]*spec.HTTPRouteGroup) bool
HTTPRouteGroupSpecsFunc is the callback function type for HTTP route group specs.
type Informer ¶
type Informer interface { OnPartOfServiceSpec(serviceName string, fn ServiceSpecFunc) error OnAllServiceSpecs(fn ServiceSpecsFunc) error OnPartOfServiceInstanceSpec(serviceName, instanceID string, fn ServicesInstanceSpecFunc) error OnServiceInstanceSpecs(serviceName string, fn ServiceInstanceSpecsFunc) error OnAllServiceInstanceSpecs(fn ServiceInstanceSpecsFunc) error OnPartOfServiceInstanceStatus(serviceName, instanceID string, fn ServiceInstanceStatusFunc) error OnServiceInstanceStatuses(serviceName string, fn ServiceInstanceStatusesFunc) error OnAllServiceInstanceStatuses(fn ServiceInstanceStatusesFunc) error OnPartOfTenantSpec(tenantName string, fn TenantSpecFunc) error OnAllTenantSpecs(fn TenantSpecsFunc) error OnPartOfIngressSpec(serviceName string, fn IngressSpecFunc) error OnAllIngressSpecs(fn IngressSpecsFunc) error OnPartOfHTTPRouteGroupSpec(groupName string, fn HTTPRouteGroupSpecFunc) error OnAllHTTPRouteGroupSpecs(fn HTTPRouteGroupSpecsFunc) error OnPartOfTrafficTargetSpec(ttName string, fn TrafficTargetSpecFunc) error OnAllTrafficTargetSpecs(fn TrafficTargetSpecsFunc) error OnPartOfServiceCanary(serviceCanaryName string, fn ServiceCanarySpecFunc) error OnAllServiceCanaries(fn ServiceCanariesFunc) error StopWatchServiceSpec(serviceName string) StopWatchServiceInstanceSpec(serviceName string) OnAllServerCert(fn ServiceCertsFunc) error OnServerCert(serviceName, instanceID string, fn CertFunc) error OnIngressControllerCert(instaceID string, fn CertFunc) error Close() }
Informer is the interface for informing two type of storage changed for every Mesh spec structure.
- Based on comparison between old and new part of entry.
- Based on comparison on entries with the same prefix.
func NewInformer ¶
NewInformer creates an informer If service is specified, will only inform resource changes within the same tenant of the service and the global tenant, note this only apply to service, service instance and service status. if service is empty, will inform all resource changes.
type IngressSpecFunc ¶
IngressSpecFunc is the callback function type for ingress spec.
type IngressSpecsFunc ¶
IngressSpecsFunc is the callback function type for ingress specs.
type ServiceCanariesFunc ¶ added in v1.4.0
type ServiceCanariesFunc func(value map[string]*spec.ServiceCanary) bool
ServiceCanariesFunc is the callback function type for service canary specs.
type ServiceCanarySpecFunc ¶ added in v1.4.0
type ServiceCanarySpecFunc func(event Event, value *spec.ServiceCanary) bool
ServiceCanarySpecFunc is the callback function type for service canary spec.
type ServiceCertsFunc ¶ added in v1.3.1
type ServiceCertsFunc func(value map[string]*spec.Certificate) bool
ServiceCertsFunc is the callback function type for service certs.
type ServiceInstanceSpecsFunc ¶
type ServiceInstanceSpecsFunc func(value map[string]*spec.ServiceInstanceSpec) bool
ServiceInstanceSpecsFunc is the callback function type for service instance specs.
type ServiceInstanceStatusFunc ¶
type ServiceInstanceStatusFunc func(event Event, value *spec.ServiceInstanceStatus) bool
ServiceInstanceStatusFunc is the callback function type for service instance status.
type ServiceInstanceStatusesFunc ¶
type ServiceInstanceStatusesFunc func(value map[string]*spec.ServiceInstanceStatus) bool
ServiceInstanceStatusesFunc is the callback function type for service instance statuses.
type ServiceSpecFunc ¶
ServiceSpecFunc is the callback function type for service spec.
type ServiceSpecsFunc ¶
ServiceSpecsFunc is the callback function type for service specs.
type ServicesInstanceSpecFunc ¶
type ServicesInstanceSpecFunc func(event Event, instanceSpec *spec.ServiceInstanceSpec) bool
ServicesInstanceSpecFunc is the callback function type for service instance spec.
type TenantSpecFunc ¶
TenantSpecFunc is the callback function type for tenant spec.
type TenantSpecsFunc ¶
TenantSpecsFunc is the callback function type for tenant specs.
type TrafficTargetSpecFunc ¶ added in v1.3.2
type TrafficTargetSpecFunc func(event Event, value *spec.TrafficTarget) bool
TrafficTargetSpecFunc is the callback function type for traffic target spec.
type TrafficTargetSpecsFunc ¶ added in v1.3.2
type TrafficTargetSpecsFunc func(value map[string]*spec.TrafficTarget) bool
TrafficTargetSpecsFunc is the callback function type for traffic target specs.