server

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer added in v1.1.0

type APIServer struct {
	pb.UnimplementedPceServiceServer
	// contains filtered or unexported fields
}

func NewAPIServer added in v1.1.0

func NewAPIServer(pce *Server, grpcServer *grpc.Server) *APIServer

func (*APIServer) CreateSRPolicy added in v1.2.0

func (s *APIServer) CreateSRPolicy(ctx context.Context, input *pb.CreateSRPolicyInput) (*pb.RequestStatus, error)

func (*APIServer) CreateSRPolicyWithoutLinkState added in v1.2.0

func (s *APIServer) CreateSRPolicyWithoutLinkState(ctx context.Context, input *pb.CreateSRPolicyInput) (*pb.RequestStatus, error)

func (*APIServer) DeleteSession added in v1.2.1

func (c *APIServer) DeleteSession(ctx context.Context, input *pb.Session) (*pb.RequestStatus, error)

func (*APIServer) GetSRPolicyList added in v1.2.0

func (s *APIServer) GetSRPolicyList(context.Context, *empty.Empty) (*pb.SRPolicyList, error)

func (*APIServer) GetSessionList added in v1.2.1

func (s *APIServer) GetSessionList(context.Context, *empty.Empty) (*pb.SessionList, error)

func (*APIServer) GetTed added in v1.1.0

func (s *APIServer) GetTed(context.Context, *empty.Empty) (*pb.Ted, error)

func (*APIServer) Serve added in v1.1.0

func (s *APIServer) Serve(address string, port string) error

type PceOptions

type PceOptions struct {
	PcepAddr  string
	PcepPort  string
	GrpcAddr  string
	GrpcPort  string
	TedEnable bool
}

type Server

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

func (*Server) SRPolicies added in v1.2.0

func (s *Server) SRPolicies() map[netip.Addr][]table.SRPolicy

SRPolicies returns a map of registered SR Policy with key sessionAddr

func (*Server) SearchSession added in v1.2.0

func (s *Server) SearchSession(peerAddr netip.Addr) *Session

func (*Server) Serve added in v1.2.0

func (s *Server) Serve(address string, port string) error

type ServerError added in v1.1.0

type ServerError struct {
	Error  error
	Server string
}

func NewPce

func NewPce(o *PceOptions, logger *zap.Logger, tedElemsChan chan []table.TedElem) ServerError

type Session

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

func NewSession

func NewSession(sessionID uint8, logger *zap.Logger) *Session

func (*Session) DeleteSRPolicy added in v1.2.0

func (ss *Session) DeleteSRPolicy(plspID uint32)

func (*Session) Established

func (ss *Session) Established()

func (*Session) Open

func (ss *Session) Open() error

func (*Session) ReceiveOpen added in v1.1.0

func (ss *Session) ReceiveOpen() error

func (*Session) ReceivePcepMessage

func (ss *Session) ReceivePcepMessage() error

func (*Session) RegisterSRPolicy added in v1.2.0

func (ss *Session) RegisterSRPolicy(srPolicy table.SRPolicy)

func (*Session) SearchSRPolicyPlspID added in v1.2.1

func (ss *Session) SearchSRPolicyPlspID(color uint32, endpoint netip.Addr) (uint32, bool)

SearchSRPolicyPlspID returns the PLSP-ID of a registered SR Policy, along with a boolean value indicating if it was found.

func (*Session) SendClose added in v1.2.1

func (ss *Session) SendClose(reason uint8) error

func (*Session) SendKeepalive

func (ss *Session) SendKeepalive() error

func (*Session) SendOpen

func (ss *Session) SendOpen() error

func (*Session) SendPCInitiate

func (ss *Session) SendPCInitiate(srPolicy table.SRPolicy) error

func (*Session) SendPCUpdate

func (ss *Session) SendPCUpdate(srPolicy table.SRPolicy) error

Jump to

Keyboard shortcuts

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