service

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package service provides business layer between mesh and store.

Index

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 New

func New(superSpec *supervisor.Spec) *Service

New creates a service with spec

func (*Service) DelAllIngressControllerInstanceCert

func (s *Service) DelAllIngressControllerInstanceCert()

DelAllIngressControllerInstanceCert deletes all ingress controller certs.

func (*Service) DelIngressControllerInstanceCert

func (s *Service) DelIngressControllerInstanceCert(instanceID string)

DelIngressControllerInstanceCert deletes root cert.

func (*Service) DelRootCert

func (s *Service) DelRootCert()

DelRootCert deletes root cert.

func (*Service) DelServiceInstanceCert

func (s *Service) DelServiceInstanceCert(serviceName, instanceID string)

DelServiceInstanceCert deletes one service's cert.

func (*Service) DeleteCustomResource

func (s *Service) DeleteCustomResource(kind, name string)

DeleteCustomResource deletes a custom resource

func (*Service) DeleteCustomResourceKind

func (s *Service) DeleteCustomResourceKind(kind string)

DeleteCustomResourceKind deletes a custom resource kind

func (*Service) DeleteHTTPRouteGroup

func (s *Service) DeleteHTTPRouteGroup(name string)

DeleteHTTPRouteGroup deletes a HTTP route group

func (*Service) DeleteIngressSpec

func (s *Service) DeleteIngressSpec(ingressName string)

DeleteIngressSpec deletes the ingress spec

func (*Service) DeleteServiceCanary

func (s *Service) DeleteServiceCanary(serviceCanaryName string)

DeleteServiceCanary deletes service canary.

func (*Service) DeleteServiceInstanceSpec

func (s *Service) DeleteServiceInstanceSpec(serviceName, instanceID string)

DeleteServiceInstanceSpec deletes the service instance spec.

func (*Service) DeleteServiceSpec

func (s *Service) DeleteServiceSpec(serviceName string)

DeleteServiceSpec deletes service spec by its name

func (*Service) DeleteTenantSpec

func (s *Service) DeleteTenantSpec(tenantName string)

DeleteTenantSpec deletes tenant spec

func (*Service) DeleteTrafficTarget

func (s *Service) DeleteTrafficTarget(name string)

DeleteTrafficTarget deletes a traffic target

func (*Service) GetCustomResource

func (s *Service) GetCustomResource(kind, name string) spec.CustomResource

GetCustomResource gets custom resource with its kind & name

func (*Service) GetCustomResourceKind

func (s *Service) GetCustomResourceKind(name string) *spec.CustomResourceKind

GetCustomResourceKind gets custom resource kind with its name

func (*Service) GetHTTPRouteGroup

func (s *Service) GetHTTPRouteGroup(name string) *spec.HTTPRouteGroup

GetHTTPRouteGroup gets HTTP route group with its name

func (*Service) GetIngressControllerInstanceCert

func (s *Service) GetIngressControllerInstanceCert(instaceID string) *spec.Certificate

GetIngressControllerInstanceCert gets one ingress controller's cert

func (*Service) GetIngressControllerInstanceSpec

func (s *Service) GetIngressControllerInstanceSpec(instaceID string) *spec.ServiceInstanceSpec

GetIngressControllerInstanceSpec gets one ingress controller's spec

func (*Service) GetIngressSpec

func (s *Service) GetIngressSpec(ingressName string) *spec.Ingress

GetIngressSpec gets the ingress spec

func (*Service) GetIngressSpecWithInfo

func (s *Service) GetIngressSpecWithInfo(ingressName string) (*spec.Ingress, *mvccpb.KeyValue)

GetIngressSpecWithInfo gets ingress spec with information.

func (*Service) GetRootCert

func (s *Service) GetRootCert() *spec.Certificate

GetRootCert gets the root cert.

func (*Service) GetServiceCanary

func (s *Service) GetServiceCanary(serviceCanaryName string) *spec.ServiceCanary

GetServiceCanary gets the service canary.

func (*Service) GetServiceInstanceCert

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

func (s *Service) GetServiceSpec(serviceName string) *spec.Service

GetServiceSpec gets the service spec by its name

func (*Service) GetServiceSpecWithInfo

func (s *Service) GetServiceSpecWithInfo(serviceName string) (*spec.Service, *mvccpb.KeyValue)

GetServiceSpecWithInfo gets the service spec by its name

func (*Service) GetTenantSpec

func (s *Service) GetTenantSpec(tenantName string) *spec.Tenant

GetTenantSpec gets tenant spec with its name

func (*Service) GetTenantSpecWithInfo

func (s *Service) GetTenantSpecWithInfo(tenantName string) (*spec.Tenant, *mvccpb.KeyValue)

GetTenantSpecWithInfo gets tenant spec with information

func (*Service) GetTrafficTarget

func (s *Service) GetTrafficTarget(name string) *spec.TrafficTarget

GetTrafficTarget gets traffic target with its name

func (*Service) ListAllIngressControllerInstanceCerts

func (s *Service) ListAllIngressControllerInstanceCerts() []*spec.Certificate

ListAllIngressControllerInstanceCerts gets the ingress controller cert.

func (*Service) ListAllIngressControllerInstanceSpecs

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

func (s *Service) ListCustomResourceKinds() []*spec.CustomResourceKind

ListCustomResourceKinds lists custom resource kinds

func (*Service) ListCustomResources

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

func (s *Service) ListHTTPRouteGroups() []*spec.HTTPRouteGroup

ListHTTPRouteGroups lists HTTP route groups

func (*Service) ListIngressSpecs

func (s *Service) ListIngressSpecs() []*spec.Ingress

ListIngressSpecs lists the ingress specs

func (*Service) ListServiceCanaries

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

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

func (s *Service) ListServiceSpecs() []*spec.Service

ListServiceSpecs lists services specs

func (*Service) ListTenantSpecs

func (s *Service) ListTenantSpecs() []*spec.Tenant

ListTenantSpecs lists tenant specs

func (*Service) ListTrafficTargets

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

func (s *Service) PutCustomResource(resource spec.CustomResource, update bool)

PutCustomResource writes the custom resource kind to storage.

func (*Service) PutCustomResourceKind

func (s *Service) PutCustomResourceKind(kind *spec.CustomResourceKind, update bool)

PutCustomResourceKind writes the custom resource kind to storage.

func (*Service) PutHTTPRouteGroup

func (s *Service) PutHTTPRouteGroup(group *spec.HTTPRouteGroup)

PutHTTPRouteGroup writes the HTTP route group to storage.

func (*Service) PutIngressControllerInstanceCert

func (s *Service) PutIngressControllerInstanceCert(instaceID string, cert *spec.Certificate)

PutIngressControllerInstanceCert puts the root cert.

func (*Service) PutIngressControllerInstanceSpec

func (s *Service) PutIngressControllerInstanceSpec(instance *spec.ServiceInstanceSpec)

PutIngressControllerInstanceSpec puts ingress controller's spec

func (*Service) PutIngressSpec

func (s *Service) PutIngressSpec(ingressSpec *spec.Ingress)

PutIngressSpec writes the ingress spec

func (*Service) PutRootCert

func (s *Service) PutRootCert(cert *spec.Certificate)

PutRootCert puts the root cert.

func (*Service) PutServiceCanarySpec

func (s *Service) PutServiceCanarySpec(serviceCanarySpec *spec.ServiceCanary)

PutServiceCanarySpec updates the service canary spec.

func (*Service) PutServiceInstanceCert

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

func (s *Service) PutServiceSpec(serviceSpec *spec.Service)

PutServiceSpec writes the service spec

func (*Service) PutTenantSpec

func (s *Service) PutTenantSpec(tenantSpec *spec.Tenant)

PutTenantSpec writes the tenant spec.

func (*Service) PutTrafficTarget

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

func (s *Service) WatchCustomResource(ctx context.Context, kind string, onChange func([]spec.CustomResource)) error

WatchCustomResource watches custom resources of the specified kind

Jump to

Keyboard shortcuts

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