Documentation ¶
Index ¶
- Variables
- type Event
- type GJSONPath
- type Informer
- type IngressSpecFunc
- type IngressSpecsFunc
- type ServiceInstanceSpecsFunc
- type ServiceInstanceStatusFunc
- type ServiceInstanceStatusesFunc
- type ServiceSpecFunc
- type ServiceSpecsFunc
- type ServicesInstanceSpecFunc
- type TenantSpecFunc
- type TenantSpecsFunc
Constants ¶
This section is empty.
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 GJSONPath ¶
type GJSONPath string
GJSONPath is the type of inform path, in GJSON syntax.
const ( // EventUpdate is the update inform event. EventUpdate = "Update" // EventDelete is the delete inform event. EventDelete = "Delete" // AllParts is the path of the whole structure. AllParts GJSONPath = "" // ServiceObservability is the path of service observability. ServiceObservability GJSONPath = "observability" // ServiceResilience is the path of service resilience. ServiceResilience GJSONPath = "resilience" // ServiceCanary is the path of service canary. ServiceCanary GJSONPath = "canary" // ServiceLoadBalance is the path of service loadbalance. ServiceLoadBalance GJSONPath = "loadBalance" // ServiceCircuitBreaker is the path of service resilience's circuritBreaker part. ServiceCircuitBreaker GJSONPath = "resilience.circuitBreaker" )
type Informer ¶
type Informer interface { OnPartOfServiceSpec(serviceName string, gjsonPath GJSONPath, fn ServiceSpecFunc) error OnServiceSpecs(servicePrefix string, fn ServiceSpecsFunc) error OnPartOfInstanceSpec(serviceName, instanceID string, gjsonPath GJSONPath, fn ServicesInstanceSpecFunc) error OnServiceInstanceSpecs(serviceName string, fn ServiceInstanceSpecsFunc) error OnPartOfServiceInstanceStatus(serviceName, instanceID string, gjsonPath GJSONPath, fn ServiceInstanceStatusFunc) error OnServiceInstanceStatuses(serviceName string, fn ServiceInstanceStatusesFunc) error OnPartOfTenantSpec(tenantName string, gjsonPath GJSONPath, fn TenantSpecFunc) error OnTenantSpecs(tenantPrefix string, fn TenantSpecsFunc) error OnPartOfIngressSpec(serviceName string, gjsonPath GJSONPath, fn IngressSpecFunc) error OnIngressSpecs(fn IngressSpecsFunc) error StopWatchServiceSpec(serviceName string, gjsonPath GJSONPath) StopWatchServiceInstanceSpec(serviceName string) 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.
type IngressSpecFunc ¶
IngressSpecFunc is the callback function type for service spec.
type IngressSpecsFunc ¶
IngressSpecFunc is the callback function type for service specs.
type ServiceInstanceSpecsFunc ¶
type ServiceInstanceSpecsFunc func(value map[string]*spec.ServiceInstanceSpec) bool
ServiceInstanceSpecFunc 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 ¶
ServiceSpecFunc is the callback function type for service specs.
type ServicesInstanceSpecFunc ¶
type ServicesInstanceSpecFunc func(event Event, instanceSpec *spec.ServiceInstanceSpec) bool
ServiceInstanceSpecFunc is the callback function type for service instance spec.
type TenantSpecFunc ¶
TenantSpecFunc is the callback function type for tenant spec.