registry

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithClient = WithClientK8s

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 added in v0.2.0

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 added in v0.2.0

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

func WithClientK8s(k8s *ek8s.Component) Option

Deprecated: 使用WithClient

func WithKind added in v0.2.0

func WithKind(kind string) Option

func WithOnFailHandle added in v0.2.0

func WithOnFailHandle(onFileHandle string) Option

func WithScheme added in v0.2.0

func WithScheme(scheme string) Option

Jump to

Keyboard shortcuts

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