Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResolver ¶
func RegisterResolver ¶
func RegisterResolver()
Types ¶
type Client ¶
type Client struct { ClientSet *kubernetes.Clientset InformerFactory informers.SharedInformerFactory // contains filtered or unexported fields }
type EndpointController ¶
type EndpointController interface { AddOnUpdateFunc(serviceName string, updateFunc OnUpdateFunc) GetEndpoints(serviceName string, namespace string) ([]*ServiceInstance, error) }
func NewEndpointController ¶
func NewEndpointController(client *Client) (EndpointController, error)
type K8sSubscriber ¶
type K8sSubscriber struct { Subscriber // contains filtered or unexported fields }
func (*K8sSubscriber) OnUpdate ¶
func (s *K8sSubscriber) OnUpdate()
func (*K8sSubscriber) SetUpdateFunc ¶
func (s *K8sSubscriber) SetUpdateFunc(f func())
func (*K8sSubscriber) Values ¶
func (s *K8sSubscriber) Values() []string
type OnUpdateFunc ¶
type OnUpdateFunc func(addresses []*ServiceInstance)
type Registry ¶
type Registry interface {
NewSubscriber(service *Service) Subscriber
}
func NewRegistry ¶
func NewRegistry(controller EndpointController) Registry
type Service ¶
func (*Service) EndpointName ¶
type ServiceInstance ¶
func (*ServiceInstance) FullName ¶
func (s *ServiceInstance) FullName() string
type ServiceInstanceSlice ¶
type ServiceInstanceSlice []*ServiceInstance
func (ServiceInstanceSlice) Len ¶
func (s ServiceInstanceSlice) Len() int
func (ServiceInstanceSlice) Less ¶
func (s ServiceInstanceSlice) Less(i, j int) bool
func (ServiceInstanceSlice) Swap ¶
func (s ServiceInstanceSlice) Swap(i, j int)
type Subscriber ¶
type Subscriber interface { SetUpdateFunc(func()) OnUpdate() Values() []string }
Click to show internal directories.
Click to hide internal directories.