server

package
v0.0.0-...-b66e341 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package server provides server function for multus-proxy.

Index

Constants

View Source
const LabelServiceProxyName = "service.kubernetes.io/service-proxy-name"

LabelServiceProxyName specifies Kubernetes label for service proxy

View Source
const PolicyNetworkAnnotation = "k8s.v1.cni.cncf.io/policy-for"

PolicyNetworkAnnotation is annotation for multiNetworkPolicy, to specify which networks(i.e. net-attach-def) are the targets of the policy

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// kubeconfig is the path to a KubeConfig file.
	Kubeconfig string
	// contains filtered or unexported fields
}

Options stores option for the command

func NewOptions

func NewOptions() *Options

NewOptions initializes Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds command line flags into command

func (*Options) Run

func (o *Options) Run() error

Run invokes server

func (*Options) Stop

func (o *Options) Stop()

Stop halts the command

type Server

type Server struct {
	Client   clientset.Interface
	Hostname string

	Broadcaster      record.EventBroadcaster
	Recorder         record.EventRecorder
	Options          *Options
	ConfigSyncPeriod time.Duration
	NodeRef          *v1.ObjectReference
	// contains filtered or unexported fields
}

Server structure defines data for server

func NewServer

func NewServer(o *Options) (*Server, error)

NewServer ...

func (*Server) OnEndpointSliceAdd

func (s *Server) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice)

OnEndpointSliceAdd ...

func (*Server) OnEndpointSliceDelete

func (s *Server) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice)

OnEndpointSliceDelete ...

func (*Server) OnEndpointSliceSynced

func (s *Server) OnEndpointSliceSynced()

OnEndpointSliceSynced ...

func (*Server) OnEndpointSliceUpdate

func (s *Server) OnEndpointSliceUpdate(oldEndpointSlice, endpointSlice *discovery.EndpointSlice)

OnEndpointSliceUpdate ...

func (*Server) OnPodAdd

func (s *Server) OnPodAdd(pod *v1.Pod)

OnPodAdd ...

func (*Server) OnPodDelete

func (s *Server) OnPodDelete(pod *v1.Pod)

OnPodDelete ...

func (*Server) OnPodSynced

func (s *Server) OnPodSynced()

OnPodSynced ...

func (*Server) OnPodUpdate

func (s *Server) OnPodUpdate(oldPod, pod *v1.Pod)

OnPodUpdate ...

func (*Server) OnServiceAdd

func (s *Server) OnServiceAdd(service *v1.Service)

OnServiceAdd ...

func (*Server) OnServiceDelete

func (s *Server) OnServiceDelete(service *v1.Service)

OnServiceDelete ...

func (*Server) OnServiceSynced

func (s *Server) OnServiceSynced()

OnServiceSynced ...

func (*Server) OnServiceUpdate

func (s *Server) OnServiceUpdate(oldService, service *v1.Service)

OnServiceUpdate ...

func (*Server) Run

func (s *Server) Run(hostname string, stopCh chan struct{}) error

Run ...

func (*Server) Sync

func (s *Server) Sync()

Sync ...

func (*Server) SyncLoop

func (s *Server) SyncLoop()

SyncLoop ...

Jump to

Keyboard shortcuts

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