service

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package service contains logic for managing Service resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler is a handler for services.

func NewHandler

func NewHandler(annotationKey string, ipMapper IPMapper, logger *zap.Logger) (*Handler, error)

NewHandler returns a new Handler.

func (*Handler) Handle

func (s *Handler) Handle(svc *corev1.Service) error

Handle handles a service.

func (*Handler) HandleDelete

func (s *Handler) HandleDelete(svcName string) error

HandleDelete handles a service deletion.

type IPMapper

type IPMapper interface {
	Add(svcName string, hostPort, svcPort int) error
	Remove(svcName string)
}

IPMapper is an interface for creating or removing port mappings for services.

Jump to

Keyboard shortcuts

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