registry

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func (*Component) Close

func (reg *Component) Close() error

Close ...

func (*Component) IsValid

func (reg *Component) IsValid(ctx context.Context) error

IsValid 判断k8s Registry是否有效

func (*Component) ListServices

func (reg *Component) ListServices(ctx context.Context, t eregistry.Target) (services []*server.ServiceInfo, err error)

ListServices list service registered in registry with name `name`

func (*Component) RegisterService

func (reg *Component) RegisterService(ctx context.Context, info *server.ServiceInfo) error

RegisterService do noting

func (*Component) SyncServices

func (*Component) UnregisterService

func (reg *Component) UnregisterService(ctx context.Context, info *server.ServiceInfo) error

UnregisterService do noting

func (*Component) WatchServices

func (reg *Component) WatchServices(ctx context.Context, t eregistry.Target) (chan eregistry.Endpoints, error)

WatchServices watch service change event, then return address list

type Config

type Config struct {
	Scheme       string
	Kind         string
	OnFailHandle string
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

type Container

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

func DefaultContainer

func DefaultContainer() *Container

func Load

func Load(key string) *Container

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

Build ...

type Option

type Option func(c *Container)

func WithClient

func WithClient(k8s *ek8s.Component) Option

func WithKind

func WithKind(kind string) Option

func WithOnFailHandle

func WithOnFailHandle(onFileHandle string) Option

func WithScheme

func WithScheme(scheme string) Option

Jump to

Keyboard shortcuts

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