k8s

package
v0.0.0-...-6aee3ff Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointFields

func EndpointFields(endpoints *v1.Endpoints) log.Fields

func NewListWatch

func NewListWatch(client *kubernetes.Clientset, resource string) *cache.ListWatch

func NodeFields

func NodeFields(node *v1.Node) log.Fields

func PodFields

func PodFields(svc *v1.Pod) log.Fields

func ServiceFields

func ServiceFields(svc *v1.Service) log.Fields

Types

type EndpointCache

type EndpointCache struct {
	// contains filtered or unexported fields
}

func NewEndpointCache

func NewEndpointCache(source cache.ListerWatcher, syncInterval time.Duration, bufferSize int) *EndpointCache

func (*EndpointCache) GetByIP

func (s *EndpointCache) GetByIP(ip string) (*v1.Endpoints, error)

GetByIP returns the Endpoint

func (*EndpointCache) GetMetadataByIP

func (s *EndpointCache) GetMetadataByIP(ip string) (map[string]string, error)

GetMetadataByIP returns the Endpoint metadata

func (*EndpointCache) Run

func (s *EndpointCache) Run(ctx context.Context) error

Run starts the controller processing updates. Blocks until the cache has synced

type NodeCache

type NodeCache struct {
	// contains filtered or unexported fields
}

func NewNodeCache

func NewNodeCache(source cache.ListerWatcher, syncInterval time.Duration, bufferSize int) *NodeCache

func (*NodeCache) GetByIP

func (s *NodeCache) GetByIP(ip string) (*v1.Node, error)

GetByIP returns the node

func (*NodeCache) GetMetadataByIP

func (s *NodeCache) GetMetadataByIP(ip string) (map[string]string, error)

GetMetadataByIP returns the node metadata

func (*NodeCache) Run

func (s *NodeCache) Run(ctx context.Context) error

Run starts the controller processing updates. Blocks until the cache has synced

type PodCache

type PodCache struct {
	// contains filtered or unexported fields
}

func NewPodCache

func NewPodCache(source cache.ListerWatcher, syncInterval time.Duration, bufferSize int) *PodCache

func (*PodCache) GetByIP

func (s *PodCache) GetByIP(ip string) (*v1.Pod, error)

GetByIP returns the pod

func (*PodCache) GetMetadataByIP

func (s *PodCache) GetMetadataByIP(ip string) (map[string]string, error)

GetMetadataByIP returns the svc metadata

func (*PodCache) Run

func (s *PodCache) Run(ctx context.Context) error

Run starts the controller processing updates. Blocks until the cache has synced

type ServiceCache

type ServiceCache struct {
	// contains filtered or unexported fields
}

func NewServiceCache

func NewServiceCache(source cache.ListerWatcher, syncInterval time.Duration, bufferSize int) *ServiceCache

func (*ServiceCache) GetByIP

func (s *ServiceCache) GetByIP(ip string) (*v1.Service, error)

GetByIP returns the service

func (*ServiceCache) GetMetadataByIP

func (s *ServiceCache) GetMetadataByIP(ip string) (map[string]string, error)

GetMetadataByIP returns the svc metadata

func (*ServiceCache) Run

func (s *ServiceCache) Run(ctx context.Context) error

Run starts the controller processing updates. Blocks until the cache has synced

Jump to

Keyboard shortcuts

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