eurekaserviceregistry

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: 8 Imported by: 0

Documentation

Overview

Package eurekaserviceregistry provides EurekaServiceRegistry.

Index

Constants

View Source
const (
	// Category is the category of EurekaServiceRegistry.
	Category = supervisor.CategoryBusinessController

	// Kind is the kind of EurekaServiceRegistry.
	Kind = "EurekaServiceRegistry"

	// MetaKeyRegistryName is the key of service metadata.
	MetaKeyRegistryName = "RegistryName"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EurekaServiceRegistry

type EurekaServiceRegistry struct {
	// contains filtered or unexported fields
}

EurekaServiceRegistry is Object EurekaServiceRegistry.

func (*EurekaServiceRegistry) ApplyServiceInstances

func (e *EurekaServiceRegistry) ApplyServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error

ApplyServiceInstances applies service instances to the registry.

func (*EurekaServiceRegistry) Category

Category returns the category of EurekaServiceRegistry.

func (*EurekaServiceRegistry) Close

func (e *EurekaServiceRegistry) Close()

Close closes EurekaServiceRegistry.

func (*EurekaServiceRegistry) DefaultSpec

func (e *EurekaServiceRegistry) DefaultSpec() interface{}

DefaultSpec returns the default spec of EurekaServiceRegistry.

func (*EurekaServiceRegistry) DeleteServiceInstances

func (e *EurekaServiceRegistry) DeleteServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error

DeleteServiceInstances applies service instances to the registry.

func (*EurekaServiceRegistry) GetServiceInstance

func (e *EurekaServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)

GetServiceInstance get service instance from the registry.

func (*EurekaServiceRegistry) Inherit

func (e *EurekaServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)

Inherit inherits previous generation of EurekaServiceRegistry.

func (*EurekaServiceRegistry) Init

func (e *EurekaServiceRegistry) Init(superSpec *supervisor.Spec)

Init initializes EurekaServiceRegistry.

func (*EurekaServiceRegistry) Kind

func (e *EurekaServiceRegistry) Kind() string

Kind returns the kind of EurekaServiceRegistry.

func (*EurekaServiceRegistry) ListAllServiceInstances

func (e *EurekaServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)

ListAllServiceInstances list all service instances from the registry.

func (*EurekaServiceRegistry) ListServiceInstances

func (e *EurekaServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)

ListServiceInstances list service instances of one service from the registry.

func (*EurekaServiceRegistry) Name

func (e *EurekaServiceRegistry) Name() string

Name returns name.

func (*EurekaServiceRegistry) Notify

Notify returns notify channel.

func (*EurekaServiceRegistry) Status

Status returns status of EurekaServiceRegister.

type Spec

type Spec struct {
	Endpoints    []string `json:"endpoints" jsonschema:"required,uniqueItems=true"`
	SyncInterval string   `json:"syncInterval" jsonschema:"required,format=duration"`
}

Spec describes the EurekaServiceRegistry.

type Status

type Status struct {
	Health              string         `json:"health"`
	ServiceInstancesNum map[string]int `json:"instancesNum"`
}

Status is the status of EurekaServiceRegistry.

Jump to

Keyboard shortcuts

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