server

package
v0.0.0-...-84f6d3b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NON_EXISTENT fsmState = iota
	INITIALIZED
	OPENREC
	OPENSENT
	OPERATIONAL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

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

func NewAllocator

func NewAllocator(min, max int) *Allocator

func (*Allocator) Flag

func (a *Allocator) Flag(i int) error

func (*Allocator) Next

func (a *Allocator) Next() (int, error)

func (*Allocator) Release

func (a *Allocator) Release(i int) error

type Bitmap

type Bitmap []uint64

func NewBitmap

func NewBitmap(size int) Bitmap

func (Bitmap) Flag

func (b Bitmap) Flag(i uint)

func (Bitmap) GetFlag

func (b Bitmap) GetFlag(i uint) bool

func (Bitmap) Unflag

func (b Bitmap) Unflag(i uint)

type ConfigManager

type ConfigManager struct {
	ReloadCh chan struct{}
	// contains filtered or unexported fields
}

func NewConfigManager

func NewConfigManager(file, format string, ldpServer *Server) *ConfigManager

func (*ConfigManager) Serve

func (m *ConfigManager) Serve()

func (*ConfigManager) WaitReload

func (m *ConfigManager) WaitReload() error

type Event

type Event struct {
	Type EventType
	Data interface{}
}

type EventType

type EventType uint64
const (
	EVENT_SESSION_ADD EventType = 1 << iota
	EVENT_SESSION_DEL
	EVENT_SESSION_UPDATE
	EVENT_LABEL_LOCAL_ADD
	EVENT_LABEL_LOCAL_DEL

	EVENT_SESSION     EventType = EVENT_SESSION_ADD | EVENT_SESSION_DEL | EVENT_SESSION_UPDATE
	EVENT_LABEL_LOCAL EventType = EVENT_LABEL_LOCAL_ADD | EVENT_LABEL_LOCAL_DEL
	EVENT_LABEL       EventType = EVENT_LABEL_LOCAL
)

func (EventType) String

func (t EventType) String() string

type Interface

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

func (*Interface) ToConfig

func (i *Interface) ToConfig() config.Interface

type LDPSession

type LDPSession struct {
	ConnCh chan *net.TCPConn
	// contains filtered or unexported fields
}

func (*LDPSession) AcceptableInit

func (s *LDPSession) AcceptableInit(msg ldp.MessageInterface) (ldp.MessageInterface, bool)

func (*LDPSession) Active

func (s *LDPSession) Active() bool

func (*LDPSession) ToConfig

func (s *LDPSession) ToConfig() config.Session

type Server

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

func New

func New() *Server

func (*Server) AddInterface

func (server *Server) AddInterface(d config.Interface) error

func (*Server) AddInterfaceAddress

func (server *Server) AddInterfaceAddress(d config.Interface) error

func (*Server) AddLocalLabelMapping

func (server *Server) AddLocalLabelMapping(label int, fec ...string) error

func (*Server) DeleteInterface

func (server *Server) DeleteInterface(d config.Interface) error

func (*Server) DeleteInterfaceAddress

func (server *Server) DeleteInterfaceAddress(d config.Interface) error

func (*Server) DeleteLocalLabelMapping

func (server *Server) DeleteLocalLabelMapping(fec ...string) error

func (*Server) GetConfig

func (server *Server) GetConfig() (config.Config, error)

func (*Server) GetInterface

func (server *Server) GetInterface(d config.Interface) (config.Interface, error)

func (*Server) GetLabelMapping

func (server *Server) GetLabelMapping(fec string) (config.Mapping, error)

func (*Server) ListInterface

func (server *Server) ListInterface() ([]config.Interface, error)

func (*Server) ListLabelMapping

func (server *Server) ListLabelMapping() ([]config.Mapping, error)

func (*Server) ListSession

func (server *Server) ListSession() ([]config.Session, error)

func (*Server) MonitorSession

func (server *Server) MonitorSession() (Watcher, error)

func (*Server) StartServer

func (server *Server) StartServer(g config.Global) (*Server, error)

func (*Server) Stop

func (server *Server) Stop() error

type SyncWatcher

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

func (*SyncWatcher) Next

func (w *SyncWatcher) Next() *Event

func (*SyncWatcher) Stop

func (w *SyncWatcher) Stop()

type Watcher

type Watcher interface {
	Stop()
	Next() *Event
	// contains filtered or unexported methods
}

type ZebraClient

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

func NewZebraClient

func NewZebraClient(network, address string, ldpServer *Server) *ZebraClient

func (*ZebraClient) Serve

func (z *ZebraClient) Serve()

Jump to

Keyboard shortcuts

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