Documentation
¶
Index ¶
- type ServiceEndpoints
- type ServiceMap
- func (sm *ServiceMap) Delete(namespace, name string)
- func (sm *ServiceMap) Get(namespace, name string) (*ServiceEndpoints, bool)
- func (sm *ServiceMap) GetAll() map[string]*ServiceEndpoints
- func (sm *ServiceMap) Set(namespace, name string, se *ServiceEndpoints)
- func (sm *ServiceMap) SetEndpoint(namespace, name string, ep *v1.Endpoints)
- type ServicesController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceEndpoints ¶
ServiceEndpoints holds the service and its endpoints.
type ServiceMap ¶
type ServiceMap struct {
// contains filtered or unexported fields
}
ServiceMap encapsulates a map with a mutex to protect concurrent access.
func NewServiceMap ¶
func NewServiceMap() *ServiceMap
NewServiceMap creates and returns a new ServiceMap.
func (*ServiceMap) Delete ¶
func (sm *ServiceMap) Delete(namespace, name string)
Delete removes the ServiceEndpoints stored under the given namespace and name.
func (*ServiceMap) Get ¶
func (sm *ServiceMap) Get(namespace, name string) (*ServiceEndpoints, bool)
Get returns the ServiceEndpoints stored under the given namespace and name.
func (*ServiceMap) GetAll ¶
func (sm *ServiceMap) GetAll() map[string]*ServiceEndpoints
GetAll returns a copy of the service mapping.
func (*ServiceMap) Set ¶
func (sm *ServiceMap) Set(namespace, name string, se *ServiceEndpoints)
Set stores the ServiceEndpoints under the given namespace and name.
func (*ServiceMap) SetEndpoint ¶
func (sm *ServiceMap) SetEndpoint(namespace, name string, ep *v1.Endpoints)
SetEndpoint updates the Endpoint for the ServiceEndpoints stored under the given namespace and name.
type ServicesController ¶
type ServicesController struct {
Clientset *kubernetes.Clientset
Services *ServiceMap
Proxy nat.ProxyProcessor
}
Click to show internal directories.
Click to hide internal directories.