Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultDaemonAddress = &net.UnixAddr{ Name: "/tmp/panapid.sock", Net: "unix", } ErrDeref = errors.New("Can not dereference Nil value") )
Functions ¶
func NewSelectorServer ¶
func NewSelectorServer(selector ServerSelector) (*rpc.Server, error)
Types ¶
type Msg ¶
type Msg struct {
Local *pan.UDPAddr
Remote *pan.UDPAddr
Fingerprint *pan.PathFingerprint
PathInterface *pan.PathInterface
Paths []*Path
}
type Path ¶
type Path struct {
Source pan.IA
Destination pan.IA
Metadata *pan.PathMetadata
Fingerprint pan.PathFingerprint
//ForwardingPath pan.ForwardingPath
Expiry time.Time
}
func NewPathFrom ¶
type SelectorClient ¶
type SelectorClient struct {
// contains filtered or unexported fields
}
func NewSelectorClient ¶
func NewSelectorClient(conn io.ReadWriteCloser) *SelectorClient
func (*SelectorClient) Close ¶
func (s *SelectorClient) Close() error
func (*SelectorClient) Initialize ¶
func (s *SelectorClient) Initialize(local, remote pan.UDPAddr, paths []*pan.Path)
func (*SelectorClient) Path ¶
func (s *SelectorClient) Path() *pan.Path
func (*SelectorClient) PathDown ¶
func (s *SelectorClient) PathDown(fp pan.PathFingerprint, pi pan.PathInterface)
func (*SelectorClient) Refresh ¶
func (s *SelectorClient) Refresh(paths []*pan.Path)
type SelectorServer ¶
type SelectorServer struct {
// contains filtered or unexported fields
}
func (*SelectorServer) Close ¶
func (s *SelectorServer) Close(args, resp *Msg) error
func (*SelectorServer) Initialize ¶
func (s *SelectorServer) Initialize(args, resp *Msg) error
func (*SelectorServer) Path ¶
func (s *SelectorServer) Path(args, resp *Msg) error
func (*SelectorServer) PathDown ¶
func (s *SelectorServer) PathDown(args, resp *Msg) error
func (*SelectorServer) Refresh ¶
func (s *SelectorServer) Refresh(args, resp *Msg) error
type ServerSelector ¶
type ServerSelector interface {
Initialize(pan.UDPAddr, pan.UDPAddr, []*pan.Path)
Path(pan.UDPAddr) *pan.Path
PathDown(pan.UDPAddr, pan.PathFingerprint, pan.PathInterface)
Refresh(pan.UDPAddr, []*pan.Path)
Close(pan.UDPAddr) error
}
func NewServerSelectorFunc ¶
func NewServerSelectorFunc(fn func(pan.UDPAddr) pan.Selector) ServerSelector
Click to show internal directories.
Click to hide internal directories.