service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 9 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) DeleteIngressSpec

func (s *Service) DeleteIngressSpec(ingressName string)

DeleteIngressSpec deletes the ingress 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) 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 cannary headers with information

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

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

ListIngressSpecs lists the ingress specs

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

func (s *Service) Lock()

Lock locks all store, it will do cluster panic if failed.

func (*Service) PutGlobalCanaryHeaders

func (s *Service) PutGlobalCanaryHeaders(globalCanaryHeaders *spec.GlobalCanaryHeaders)

PutGlobalCanaryHeaders puts the global canary headers

func (*Service) PutIngressSpec

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

PutIngressSpec writes the ingress spec

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

func (s *Service) Unlock()

Unlock unlocks all store, it will do cluster panic if failed.

Jump to

Keyboard shortcuts

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