Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EventAdd is sent when an object is added EventAdd Event = iota // EventUpdate is sent when an object is modified // Captures the modified object EventUpdate // EventDelete is sent when an object is deleted // Captures the object at the last known state EventDelete DefaultTaskDelay = 1 * time.Second DefaultResyncInterval = 0 DefaultNacosEndpointWeight = 100 MaxRetry = 3 ToNacos Direction = "to-nacos" ToK8s Direction = "to-k8s" Both Direction = "both" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToNacosClientParam ¶
func ConvertToNacosClientParam(options NacosOptions) vo.NacosClientParam
func ShouldServiceSync ¶
Types ¶
type Controller ¶
type Controller interface { Run(<-chan struct{}) HasSynced() bool }
type KubeClient ¶
type KubeClient interface { // KubeInformer returns an informer factory for kube client InformerFactory() informers.SharedInformerFactory Run(<-chan struct{}) }
func NewKubeClient ¶
func NewKubeClient(option KubeOptions) (KubeClient, error)
type KubeOptions ¶
type NacosClient ¶
type NacosClient interface { RegisterService(ServiceInfo, []Address) UnregisterService(ServiceInfo) RegisterServiceInstances(serviceInfo ServiceInfo, addresses []Address) UnregisterServiceInstances(serviceInfo ServiceInfo, addresses []Address) }
func NewNacosClient ¶
func NewNacosClient(options NacosOptions) (NacosClient, error)
type NacosOptions ¶
type ServiceInfo ¶
type ServiceInfo struct { ServiceKey Port uint64 Metadata map[string]string }
func GenerateServiceInfo ¶
func GenerateServiceInfo(svc *v1.Service) (ServiceInfo, error)
type ServiceKey ¶
Click to show internal directories.
Click to hide internal directories.