node

package
v0.3.1-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLink(outbound *outbound, manager *manager, links map[string]*node.NodeLink) *link

func NewManager

func NewManager(m *node.Manager) *manager

func NewOutbound

func NewOutbound(tcp, udp *node.Point, mamanager *manager) *outbound

Types

type Nodes

type Nodes struct {
	grpcnode.UnimplementedNodeManagerServer
	// contains filtered or unexported fields
}

func NewNodes

func NewNodes(configPath string) (n *Nodes)

func (Nodes) Conn

func (o Nodes) Conn(host proxy.Address) (net.Conn, error)
func (n *Nodes) DeleteLinks(_ context.Context, s *node.LinkReq) (*emptypb.Empty, error)

func (*Nodes) DeleteNode

func (n *Nodes) DeleteNode(_ context.Context, s *wrapperspb.StringValue) (*emptypb.Empty, error)
func (n *Nodes) GetLinks(ctx context.Context, in *emptypb.Empty) (*node.GetLinksResp, error)

func (*Nodes) GetManager

func (*Nodes) GetNode

func (n *Nodes) GetNode(_ context.Context, s *wrapperspb.StringValue) (*node.Point, error)

func (Nodes) HTTPClient

func (o Nodes) HTTPClient() *http.Client

func (*Nodes) Latency

func (n *Nodes) Latency(c context.Context, req *node.LatencyReq) (*node.LatencyResp, error)

func (*Nodes) Now

func (n *Nodes) Now(_ context.Context, r *node.NowReq) (*node.Point, error)

func (Nodes) PacketConn

func (o Nodes) PacketConn(host proxy.Address) (net.PacketConn, error)

func (Nodes) Point

func (o Nodes) Point(udp bool) *node.Point

func (Nodes) Save

func (o Nodes) Save(p *node.Point, udp bool)
func (n *Nodes) SaveLinks(_ context.Context, l *node.SaveLinkReq) (*emptypb.Empty, error)

func (*Nodes) SaveNode

func (n *Nodes) SaveNode(c context.Context, p *node.Point) (*node.Point, error)
func (n *Nodes) UpdateLinks(c context.Context, req *node.LinkReq) (*emptypb.Empty, error)

func (*Nodes) Use

func (n *Nodes) Use(c context.Context, s *node.UseReq) (*node.Point, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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