cni

package
v0.12.1-calicov3.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0, Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalPodSpecFromAdd

func NewLocalPodSpecFromAdd(request *pb.AddRequest) (*storage.LocalPodSpec, error)

func NewLocalPodSpecFromDel

func NewLocalPodSpecFromDel(request *pb.DelRequest) *storage.LocalPodSpec

Types

type Server

type Server struct {
	*common.CalicoVppServerData

	/* without main thread */
	NumVPPWorkers uint32
	// contains filtered or unexported fields
}

func NewServer

func NewServer(v *vpplink.VppLink, rs *routing.Server, ps *policy.Server, l *logrus.Entry) (*Server, error)

Serve runs the grpc server for the Calico CNI backend API

func (*Server) Add

func (s *Server) Add(ctx context.Context, request *pb.AddRequest) (*pb.AddReply, error)

func (*Server) AddVppInterface

func (s *Server) AddVppInterface(podSpec *storage.LocalPodSpec, doHostSideConf bool) (swIfIndex uint32, err error)

AddVppInterface performs the networking for the given config and IPAM result

func (*Server) Del

func (s *Server) Del(ctx context.Context, request *pb.DelRequest) (*pb.DelReply, error)

func (*Server) DelVppInterface

func (s *Server) DelVppInterface(podSpec *storage.LocalPodSpec) error

CleanUpVPPNamespace deletes the devices in the network namespace.

func (*Server) IPNetNeedsSNAT

func (p *Server) IPNetNeedsSNAT(prefix *net.IPNet) bool

func (*Server) OnVppRestart

func (p *Server) OnVppRestart()

func (*Server) PodSpecNeedsSnat

func (s *Server) PodSpecNeedsSnat(ps *storage.LocalPodSpec) (needsSnat bool)

func (*Server) Serve

func (s *Server) Serve()

func (*Server) SetupVppRoutes

func (s *Server) SetupVppRoutes(swIfIndex uint32, podSpec *storage.LocalPodSpec) error

SetupRoutes sets up the routes for the host side of the veth pair.

func (*Server) Stop

func (s *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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