registry

package
v0.0.0-...-8010d25 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceNotFound = errors.New("service not found")

Functions

func NewBuiltinRegistryResolver

func NewBuiltinRegistryResolver(r *BuiltinRegistry) (discovery.Resolver, error)

Types

type BuiltinKitexRegistryClient

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

func NewBuiltinKitexRegistryClient

func NewBuiltinKitexRegistryClient(addr string) (*BuiltinKitexRegistryClient, error)

func (*BuiltinKitexRegistryClient) Deregister

func (rc *BuiltinKitexRegistryClient) Deregister(info *kitexregistry.Info) error

func (*BuiltinKitexRegistryClient) Register

func (rc *BuiltinKitexRegistryClient) Register(info *kitexregistry.Info) error

func (*BuiltinKitexRegistryClient) Update

func (rc *BuiltinKitexRegistryClient) Update(serviceId string) error

type BuiltinRegistry

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

func NewBuiltinRegistry

func NewBuiltinRegistry(rdb redis.UniversalClient) *BuiltinRegistry

func (*BuiltinRegistry) Count

func (r *BuiltinRegistry) Count() int

func (*BuiltinRegistry) Deregister

func (r *BuiltinRegistry) Deregister(serviceId string) error

func (*BuiltinRegistry) GetAllService

func (r *BuiltinRegistry) GetAllService() ([]*service.Service, error)

func (*BuiltinRegistry) GetServiceById

func (r *BuiltinRegistry) GetServiceById(serviceId string) (*service.Service, error)

func (*BuiltinRegistry) Register

func (r *BuiltinRegistry) Register(serviceId, host string, port int) error

func (*BuiltinRegistry) ServiceExists

func (r *BuiltinRegistry) ServiceExists(serviceId string) bool

func (*BuiltinRegistry) StartSync

func (r *BuiltinRegistry) StartSync()

func (*BuiltinRegistry) Update

func (r *BuiltinRegistry) Update(serviceId string) error

type BuiltinRegistryResolver

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

func (*BuiltinRegistryResolver) Diff

func (r *BuiltinRegistryResolver) Diff(cacheKey string, prev, next discovery.Result) (discovery.Change, bool)

func (*BuiltinRegistryResolver) Name

func (r *BuiltinRegistryResolver) Name() string

func (*BuiltinRegistryResolver) Resolve

func (*BuiltinRegistryResolver) Target

func (r *BuiltinRegistryResolver) Target(_ context.Context, target rpcinfo.EndpointInfo) (description string)

type IRegistry

type IRegistry interface {
	GetAllService() ([]*service.Service, error)
	Count() int // get current service num in registry
	GetServiceById(string) (*service.Service, error)
	ServiceExists(string) bool
}

Jump to

Keyboard shortcuts

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