service

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

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 added in v1.3.1

func (s *Service) DelAllIngressControllerInstanceCert()

DelAllIngressControllerInstanceCert deletes all ingress controller certs.

func (*Service) DelIngressControllerInstanceCert added in v1.3.1

func (s *Service) DelIngressControllerInstanceCert(instanceID string)

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

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

DelServiceInstanceCert deletes one service's cert.

func (*Service) DeleteCustomResource added in v1.3.0

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

DeleteCustomResource deletes a custom resource

func (*Service) DeleteCustomResourceKind added in v1.3.0

func (s *Service) DeleteCustomResourceKind(kind string)

DeleteCustomResourceKind deletes a custom resource kind

func (*Service) DeleteHTTPRouteGroup added in v1.3.2

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 added in v1.4.0

func (s *Service) DeleteServiceCanary(serviceCanaryName string)

DeleteServiceCanary deletes service canary.

func (*Service) DeleteServiceInstanceSpec added in v1.3.0

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 added in v1.3.2

func (s *Service) DeleteTrafficTarget(name string)

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

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 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

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 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

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

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

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 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

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

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

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 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

Jump to

Keyboard shortcuts

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