Documentation ¶
Index ¶
- type Service
- func (s *Service) DelAllIngressControllerInstanceCert()
- func (s *Service) DelIngressControllerInstanceCert(instanceID string)
- func (s *Service) DelRootCert()
- func (s *Service) DelServiceInstanceCert(serviceName, instanceID string)
- func (s *Service) DeleteCustomResource(kind, name string)
- func (s *Service) DeleteCustomResourceKind(kind string)
- func (s *Service) DeleteHTTPRouteGroup(name string)
- func (s *Service) DeleteIngressSpec(ingressName string)
- func (s *Service) DeleteServiceCanary(serviceCanaryName string)
- func (s *Service) DeleteServiceInstanceSpec(serviceName, instanceID string)
- func (s *Service) DeleteServiceSpec(serviceName string)
- func (s *Service) DeleteTenantSpec(tenantName string)
- func (s *Service) DeleteTrafficTarget(name string)
- func (s *Service) GetCustomResource(kind, name string) spec.CustomResource
- func (s *Service) GetCustomResourceKind(name string) *spec.CustomResourceKind
- func (s *Service) GetGlobalCanaryHeaders() *spec.GlobalCanaryHeaders
- func (s *Service) GetGlobalCanaryHeadersWithInfo() (*spec.GlobalCanaryHeaders, *mvccpb.KeyValue)
- func (s *Service) GetHTTPRouteGroup(name string) *spec.HTTPRouteGroup
- func (s *Service) GetIngressControllerInstanceCert(instaceID string) *spec.Certificate
- func (s *Service) GetIngressControllerInstanceSpec(instaceID string) *spec.ServiceInstanceSpec
- func (s *Service) GetIngressSpec(ingressName string) *spec.Ingress
- func (s *Service) GetIngressSpecWithInfo(ingressName string) (*spec.Ingress, *mvccpb.KeyValue)
- func (s *Service) GetRootCert() *spec.Certificate
- func (s *Service) GetServiceCanary(serviceCanaryName string) *spec.ServiceCanary
- func (s *Service) GetServiceInstanceCert(serviceName, instanceID string) *spec.Certificate
- func (s *Service) GetServiceInstanceSpec(serviceName, instanceID string) *spec.ServiceInstanceSpec
- func (s *Service) GetServiceSpec(serviceName string) *spec.Service
- func (s *Service) GetServiceSpecWithInfo(serviceName string) (*spec.Service, *mvccpb.KeyValue)
- func (s *Service) GetTenantSpec(tenantName string) *spec.Tenant
- func (s *Service) GetTenantSpecWithInfo(tenantName string) (*spec.Tenant, *mvccpb.KeyValue)
- func (s *Service) GetTrafficTarget(name string) *spec.TrafficTarget
- func (s *Service) ListAllIngressControllerInstanceCerts() []*spec.Certificate
- func (s *Service) ListAllIngressControllerInstanceSpecs() []*spec.ServiceInstanceSpec
- func (s *Service) ListAllServiceInstanceSpecs() []*spec.ServiceInstanceSpec
- func (s *Service) ListAllServiceInstanceStatuses() []*spec.ServiceInstanceStatus
- func (s *Service) ListCustomResourceKinds() []*spec.CustomResourceKind
- func (s *Service) ListCustomResources(kind string) []spec.CustomResource
- func (s *Service) ListHTTPRouteGroups() []*spec.HTTPRouteGroup
- func (s *Service) ListIngressSpecs() []*spec.Ingress
- func (s *Service) ListServiceCanaries() []*spec.ServiceCanary
- func (s *Service) ListServiceCerts() []*spec.Certificate
- func (s *Service) ListServiceInstanceSpecs(serviceName string) []*spec.ServiceInstanceSpec
- func (s *Service) ListServiceInstanceStatuses(serviceName string) []*spec.ServiceInstanceStatus
- func (s *Service) ListServiceSpecs() []*spec.Service
- func (s *Service) ListTenantSpecs() []*spec.Tenant
- func (s *Service) ListTrafficTargets() []*spec.TrafficTarget
- func (s *Service) Lock()
- func (s *Service) PutCustomResource(resource spec.CustomResource, update bool)
- func (s *Service) PutCustomResourceKind(kind *spec.CustomResourceKind, update bool)
- func (s *Service) PutGlobalCanaryHeaders(globalCanaryHeaders *spec.GlobalCanaryHeaders)
- func (s *Service) PutHTTPRouteGroup(group *spec.HTTPRouteGroup)
- func (s *Service) PutIngressControllerInstanceCert(instaceID string, cert *spec.Certificate)
- func (s *Service) PutIngressControllerInstanceSpec(instance *spec.ServiceInstanceSpec)
- func (s *Service) PutIngressSpec(ingressSpec *spec.Ingress)
- func (s *Service) PutRootCert(cert *spec.Certificate)
- func (s *Service) PutServiceCanarySpec(serviceCanarySpec *spec.ServiceCanary)
- func (s *Service) PutServiceInstanceCert(serviceName, instaceID string, cert *spec.Certificate)
- func (s *Service) PutServiceInstanceSpec(_spec *spec.ServiceInstanceSpec)
- func (s *Service) PutServiceSpec(serviceSpec *spec.Service)
- func (s *Service) PutTenantSpec(tenantSpec *spec.Tenant)
- func (s *Service) PutTrafficTarget(tt *spec.TrafficTarget)
- func (s *Service) Unlock()
- func (s *Service) WatchCustomResource(ctx context.Context, kind string, onChange func([]spec.CustomResource)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the business layer between mesh and store. It is not concurrently safe, the users need to do it by themselves.
func (*Service) DelAllIngressControllerInstanceCert ¶ added in v1.3.1
func (s *Service) DelAllIngressControllerInstanceCert()
DelAllIngressControllerInstanceCert deletes all ingress controller certs.
func (*Service) DelIngressControllerInstanceCert ¶ added in v1.3.1
DelIngressControllerInstanceCert deletes root cert.
func (*Service) DelRootCert ¶ added in v1.3.1
func (s *Service) DelRootCert()
DelRootCert deletes root cert.
func (*Service) DelServiceInstanceCert ¶ added in v1.3.1
DelServiceInstanceCert deletes one service's cert.
func (*Service) DeleteCustomResource ¶ added in v1.3.0
DeleteCustomResource deletes a custom resource
func (*Service) DeleteCustomResourceKind ¶ added in v1.3.0
DeleteCustomResourceKind deletes a custom resource kind
func (*Service) DeleteHTTPRouteGroup ¶ added in v1.3.2
DeleteHTTPRouteGroup deletes a HTTP route group
func (*Service) DeleteIngressSpec ¶
DeleteIngressSpec deletes the ingress spec
func (*Service) DeleteServiceCanary ¶ added in v1.4.0
DeleteServiceCanary deletes service canary.
func (*Service) DeleteServiceInstanceSpec ¶ added in v1.3.0
DeleteServiceInstanceSpec deletes the service instance spec.
func (*Service) DeleteServiceSpec ¶
DeleteServiceSpec deletes service spec by its name
func (*Service) DeleteTenantSpec ¶
DeleteTenantSpec deletes tenant spec
func (*Service) DeleteTrafficTarget ¶ added in v1.3.2
DeleteTrafficTarget deletes a traffic target
func (*Service) GetCustomResource ¶ added in v1.3.0
func (s *Service) GetCustomResource(kind, name string) spec.CustomResource
GetCustomResource gets custom resource with its kind & name
func (*Service) GetCustomResourceKind ¶ added in v1.3.0
func (s *Service) GetCustomResourceKind(name string) *spec.CustomResourceKind
GetCustomResourceKind gets custom resource kind with its name
func (*Service) GetGlobalCanaryHeaders ¶
func (s *Service) GetGlobalCanaryHeaders() *spec.GlobalCanaryHeaders
GetGlobalCanaryHeaders gets the global canary headers
func (*Service) GetGlobalCanaryHeadersWithInfo ¶
func (s *Service) GetGlobalCanaryHeadersWithInfo() (*spec.GlobalCanaryHeaders, *mvccpb.KeyValue)
GetGlobalCanaryHeadersWithInfo gets the global canary headers with information
func (*Service) GetHTTPRouteGroup ¶ added in v1.3.2
func (s *Service) GetHTTPRouteGroup(name string) *spec.HTTPRouteGroup
GetHTTPRouteGroup gets HTTP route group with its name
func (*Service) GetIngressControllerInstanceCert ¶ added in v1.3.1
func (s *Service) GetIngressControllerInstanceCert(instaceID string) *spec.Certificate
GetIngressControllerInstanceCert gets one ingress controller's cert
func (*Service) GetIngressControllerInstanceSpec ¶ added in v1.3.1
func (s *Service) GetIngressControllerInstanceSpec(instaceID string) *spec.ServiceInstanceSpec
GetIngressControllerInstanceSpec gets one ingress controller's spec
func (*Service) GetIngressSpec ¶
GetIngressSpec gets the ingress spec
func (*Service) GetIngressSpecWithInfo ¶
GetIngressSpecWithInfo gets ingress spec with information.
func (*Service) GetRootCert ¶ added in v1.3.1
func (s *Service) GetRootCert() *spec.Certificate
GetRootCert gets the root cert.
func (*Service) GetServiceCanary ¶ added in v1.4.0
func (s *Service) GetServiceCanary(serviceCanaryName string) *spec.ServiceCanary
GetServiceCanary gets the service canary.
func (*Service) GetServiceInstanceCert ¶ added in v1.3.1
func (s *Service) GetServiceInstanceCert(serviceName, instanceID string) *spec.Certificate
GetServiceInstanceCert gets one specified service instance's cert
func (*Service) GetServiceInstanceSpec ¶
func (s *Service) GetServiceInstanceSpec(serviceName, instanceID string) *spec.ServiceInstanceSpec
GetServiceInstanceSpec gets the service instance spec
func (*Service) GetServiceSpec ¶
GetServiceSpec gets the service spec by its name
func (*Service) GetServiceSpecWithInfo ¶
GetServiceSpecWithInfo gets the service spec by its name
func (*Service) GetTenantSpec ¶
GetTenantSpec gets tenant spec with its name
func (*Service) GetTenantSpecWithInfo ¶
GetTenantSpecWithInfo gets tenant spec with information
func (*Service) GetTrafficTarget ¶ added in v1.3.2
func (s *Service) GetTrafficTarget(name string) *spec.TrafficTarget
GetTrafficTarget gets traffic target with its name
func (*Service) ListAllIngressControllerInstanceCerts ¶ added in v1.3.1
func (s *Service) ListAllIngressControllerInstanceCerts() []*spec.Certificate
ListAllIngressControllerInstanceCerts gets the ingress controller cert.
func (*Service) ListAllIngressControllerInstanceSpecs ¶ added in v1.3.1
func (s *Service) ListAllIngressControllerInstanceSpecs() []*spec.ServiceInstanceSpec
ListAllIngressControllerInstanceSpecs lists all IngressController's instances specs
func (*Service) ListAllServiceInstanceSpecs ¶
func (s *Service) ListAllServiceInstanceSpecs() []*spec.ServiceInstanceSpec
ListAllServiceInstanceSpecs lists all service instance specs.
func (*Service) ListAllServiceInstanceStatuses ¶
func (s *Service) ListAllServiceInstanceStatuses() []*spec.ServiceInstanceStatus
ListAllServiceInstanceStatuses lists all service instance statuses.
func (*Service) ListCustomResourceKinds ¶ added in v1.3.0
func (s *Service) ListCustomResourceKinds() []*spec.CustomResourceKind
ListCustomResourceKinds lists custom resource kinds
func (*Service) ListCustomResources ¶ added in v1.3.0
func (s *Service) ListCustomResources(kind string) []spec.CustomResource
ListCustomResources lists custom resources of specified kind. if kind is empty, it returns custom objects of all kinds.
func (*Service) ListHTTPRouteGroups ¶ added in v1.3.2
func (s *Service) ListHTTPRouteGroups() []*spec.HTTPRouteGroup
ListHTTPRouteGroups lists HTTP route groups
func (*Service) ListIngressSpecs ¶
ListIngressSpecs lists the ingress specs
func (*Service) ListServiceCanaries ¶ added in v1.4.0
func (s *Service) ListServiceCanaries() []*spec.ServiceCanary
ListServiceCanaries lists service canaries. It sorts service canary in order of priority(primary) and name(secondary).
func (*Service) ListServiceCerts ¶ added in v1.3.1
func (s *Service) ListServiceCerts() []*spec.Certificate
ListServiceCerts lists services certs.
func (*Service) ListServiceInstanceSpecs ¶
func (s *Service) ListServiceInstanceSpecs(serviceName string) []*spec.ServiceInstanceSpec
ListServiceInstanceSpecs lists service instance specs.
func (*Service) ListServiceInstanceStatuses ¶
func (s *Service) ListServiceInstanceStatuses(serviceName string) []*spec.ServiceInstanceStatus
ListServiceInstanceStatuses lists service instance statuses
func (*Service) ListServiceSpecs ¶
ListServiceSpecs lists services specs
func (*Service) ListTenantSpecs ¶
ListTenantSpecs lists tenant specs
func (*Service) ListTrafficTargets ¶ added in v1.3.2
func (s *Service) ListTrafficTargets() []*spec.TrafficTarget
ListTrafficTargets lists traffic targets
func (*Service) Lock ¶
func (s *Service) Lock()
Lock locks all store, it will do cluster panic if failed.
func (*Service) PutCustomResource ¶ added in v1.3.0
func (s *Service) PutCustomResource(resource spec.CustomResource, update bool)
PutCustomResource writes the custom resource kind to storage.
func (*Service) PutCustomResourceKind ¶ added in v1.3.0
func (s *Service) PutCustomResourceKind(kind *spec.CustomResourceKind, update bool)
PutCustomResourceKind writes the custom resource kind to storage.
func (*Service) PutGlobalCanaryHeaders ¶
func (s *Service) PutGlobalCanaryHeaders(globalCanaryHeaders *spec.GlobalCanaryHeaders)
PutGlobalCanaryHeaders puts the global canary headers
func (*Service) PutHTTPRouteGroup ¶ added in v1.3.2
func (s *Service) PutHTTPRouteGroup(group *spec.HTTPRouteGroup)
PutHTTPRouteGroup writes the HTTP route group to storage.
func (*Service) PutIngressControllerInstanceCert ¶ added in v1.3.1
func (s *Service) PutIngressControllerInstanceCert(instaceID string, cert *spec.Certificate)
PutIngressControllerInstanceCert puts the root cert.
func (*Service) PutIngressControllerInstanceSpec ¶ added in v1.3.1
func (s *Service) PutIngressControllerInstanceSpec(instance *spec.ServiceInstanceSpec)
PutIngressControllerInstanceSpec puts ingress controller's spec
func (*Service) PutIngressSpec ¶
PutIngressSpec writes the ingress spec
func (*Service) PutRootCert ¶ added in v1.3.1
func (s *Service) PutRootCert(cert *spec.Certificate)
PutRootCert puts the root cert.
func (*Service) PutServiceCanarySpec ¶ added in v1.4.0
func (s *Service) PutServiceCanarySpec(serviceCanarySpec *spec.ServiceCanary)
PutServiceCanarySpec updates the service canary spec.
func (*Service) PutServiceInstanceCert ¶ added in v1.3.1
func (s *Service) PutServiceInstanceCert(serviceName, instaceID string, cert *spec.Certificate)
PutServiceInstanceCert puts one service's instance cert.
func (*Service) PutServiceInstanceSpec ¶
func (s *Service) PutServiceInstanceSpec(_spec *spec.ServiceInstanceSpec)
PutServiceInstanceSpec writes the service instance spec
func (*Service) PutServiceSpec ¶
PutServiceSpec writes the service spec
func (*Service) PutTenantSpec ¶
PutTenantSpec writes the tenant spec.
func (*Service) PutTrafficTarget ¶ added in v1.3.2
func (s *Service) PutTrafficTarget(tt *spec.TrafficTarget)
PutTrafficTarget writes the traffic target to storage.
func (*Service) Unlock ¶
func (s *Service) Unlock()
Unlock unlocks all store, it will do cluster panic if failed.
func (*Service) WatchCustomResource ¶ added in v1.3.0
func (s *Service) WatchCustomResource(ctx context.Context, kind string, onChange func([]spec.CustomResource)) error
WatchCustomResource watches custom resources of the specified kind