node

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLink(db *jsondb.DB[*node.Node], outbound *outbound, manager *manager) *link

func NewManager

func NewManager(m *node.Manager) *manager

func NewOutbound

func NewOutbound(db *jsondb.DB[*node.Node], mamanager *manager) *outbound

Types

type HashKey

type HashKey struct{}

func (HashKey) String

func (HashKey) String() string

type Nodes

type Nodes struct {
	gn.UnimplementedNodeServer
	// contains filtered or unexported fields
}

func NewNodes

func NewNodes(path string) *Nodes

func (*Nodes) Get

func (*Nodes) Latency

func (n *Nodes) Latency(c context.Context, req *latency.Requests) (*latency.Response, error)

func (*Nodes) Manager

func (n *Nodes) Manager(context.Context, *emptypb.Empty) (*node.Manager, error)

func (*Nodes) Now

func (n *Nodes) Now(context.Context, *emptypb.Empty) (*gn.NowResp, error)

func (*Nodes) Outbound added in v0.3.5

func (n *Nodes) Outbound() *outbound

func (*Nodes) Remove

func (*Nodes) Save

func (n *Nodes) Save(c context.Context, p *point.Point) (*point.Point, error)

func (*Nodes) SetRuleTags

func (n *Nodes) SetRuleTags(f func() iter.Seq[string])

func (*Nodes) Subscribe added in v0.3.5

func (f *Nodes) Subscribe() *Subscribe

func (*Nodes) Tag added in v0.3.5

func (f *Nodes) Tag() gn.TagServer

func (*Nodes) Use

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

type Subscribe

type Subscribe struct {
	gn.UnimplementedSubscribeServer
	// contains filtered or unexported fields
}

func (*Subscribe) Get

func (*Subscribe) Remove

func (s *Subscribe) Remove(_ context.Context, l *gn.LinkReq) (*emptypb.Empty, error)

func (*Subscribe) Save

func (*Subscribe) Update

func (s *Subscribe) Update(_ context.Context, req *gn.LinkReq) (*emptypb.Empty, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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