services

package
v0.0.0-...-f85a34d Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceServer

func NewServiceServer(log *logrus.Entry, handler NatSettingsHandler, refreshTime uint32) (types.Server, error)

NewServiceServer returns an instance of serviceServer with types.Server interface

Types

type NatSettingsHandler

type NatSettingsHandler interface {
	NatTranslationAdd(translation *proto.NatTranslation) error
	SetSnatAddress(ip string) error
	AddDelSnatPrefix(ip string, isAdd bool) error
	NatTranslationDelete(translation *proto.NatTranslation) error
}

type NatTranslationBuilder

type NatTranslationBuilder interface {
	ForServicePort(*v1.ServicePort) NatTranslationBuilder
	WithServiceIP(serviceIP net.IP) NatTranslationBuilder
	WithIsNodePort(isNodePort bool) NatTranslationBuilder
	Build() *proto.NatTranslation
}

func NewNatTranslationBuilder

func NewNatTranslationBuilder(service *v1.Service, ep *v1.Endpoints) NatTranslationBuilder

type ServiceEntries

type ServiceEntries struct {
	Entries   []*proto.NatTranslation
	ServiceID string
}

type ServiceHandler

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

func NewNatServiceHandler

func NewNatServiceHandler(log *logrus.Entry) *ServiceHandler

func (*ServiceHandler) AddDelSnatPrefix

func (s *ServiceHandler) AddDelSnatPrefix(ip string, isAdd bool) error

func (*ServiceHandler) NatTranslationAdd

func (s *ServiceHandler) NatTranslationAdd(translation *pb.NatTranslation) error

func (*ServiceHandler) NatTranslationDelete

func (s *ServiceHandler) NatTranslationDelete(translation *pb.NatTranslation) error

func (*ServiceHandler) SetSnatAddress

func (s *ServiceHandler) SetSnatAddress(ip string) error

type ServicesListWatchType

type ServicesListWatchType int
const (
	SERVICES_LIST_WATCH ServicesListWatchType = iota
	ENDPOINTS_LIST_WATCH
)

Jump to

Keyboard shortcuts

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