Documentation
¶
Overview ¶
Package discovery is main package of service discovery module
Index ¶
Constants ¶
View Source
const (
// YandexMDB constant SdConfig.type
YandexMDB = "yandex-mdb"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddServiceFunc ¶
AddServiceFunc services arg is map serviceId -> data source name
type Discovery ¶
type Discovery interface {
//Init casting abstract Config to determined structure
Init(c Config) error
//Start is the discoverer starting point
Start(ctx context.Context, errCh chan<- error) error
//Subscribe - binding "add" and "remove" functions. Functions will be called when services appear or disappear
Subscribe(subscriberID string, addService AddServiceFunc, removeService RemoveServiceFunc) error
//Unsubscribe - remove subscriber from list
Unsubscribe(subscriberID string) error
}
Discovery interface of abstract discovery services
type RemoveServiceFunc ¶
RemoveServiceFunc serviceIds is array of service IDs
Click to show internal directories.
Click to hide internal directories.