Documentation ¶
Index ¶
- func Find(slice []string, val string) bool
- func FirstDifferent(list0, list1 []string) string
- func GetDataSourceClient(p *pb.Peer, name string, idOfPeer string) data.DataSource
- func GetIdOfPeer(p *pb.Peer) string
- func IsRecent(timestamp uint64) bool
- func SerializeStringArray(list []string) string
- type DataSourceClient
- type Node
- func (n *Node) AddPeer(ctx context.Context, in *pb.AddPeerRequest) (*pb.AddPeerResponse, error)
- func (n *Node) AddPeerElement(peer *pb.Peer) error
- func (n *Node) AddService(service string) error
- func (n *Node) AddStaticService(service string) error
- func (n *Node) Close() error
- func (n *Node) CreateDataIfNotExists(ctx context.Context, in *pb.DataConfig) (*pb.DataInfo, error)
- func (n *Node) DataStream(getDataRequest *pb.GetDataRequest, stream pb.VeriService_DataStreamServer) error
- func (n *Node) GetDataInfo(ctx context.Context, getDataRequest *pb.GetDataRequest) (*pb.DataInfo, error)
- func (n *Node) GetDifferentAddressOf(peer *pb.Peer) string
- func (n *Node) GetNodeInfo() *pb.Peer
- func (n *Node) Info() string
- func (n *Node) Insert(ctx context.Context, insertionRequest *pb.InsertionRequest) (*pb.InsertionResponse, error)
- func (n *Node) Join(ctx context.Context, joinRequest *pb.JoinRequest) (*pb.JoinResponse, error)
- func (n *Node) JoinToPeers() error
- func (n *Node) Listen() error
- func (n *Node) PeerListItems() []*pb.Peer
- func (n *Node) Periodic() error
- func (n *Node) Ping(ctx context.Context, in *pb.PingRequest) (*pb.PingResponse, error)
- func (n *Node) Search(ctx context.Context, searchRequest *pb.SearchRequest) (*pb.SearchResponse, error)
- func (n *Node) SearchStream(searchRequest *pb.SearchRequest, stream pb.VeriService_SearchStreamServer) error
- func (n *Node) SendAddPeerRequest(id string, peerInfo *pb.Peer) error
- func (n *Node) SendJoinRequest(id string) error
- func (n *Node) SendPingRequest(id string) error
- func (n *Node) ServiceListKeys() []string
- func (n *Node) SetPeriodicTask()
- func (n *Node) StopPeriodicTask()
- func (n *Node) SyncWithPeers()
- type NodeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstDifferent ¶ added in v0.0.42
func GetDataSourceClient ¶
func GetIdOfPeer ¶
func SerializeStringArray ¶
Types ¶
type DataSourceClient ¶
type DataSourceClient struct { Ids []string Name string ConnPool *util.ConnectionPool }
func (*DataSourceClient) GetDataInfo ¶
func (dcs *DataSourceClient) GetDataInfo() *pb.DataInfo
func (*DataSourceClient) GetID ¶
func (dcs *DataSourceClient) GetID() string
func (*DataSourceClient) Insert ¶
func (dcs *DataSourceClient) Insert(datum *pb.Datum, config *pb.InsertConfig) error
func (*DataSourceClient) StreamSearch ¶
func (dcs *DataSourceClient) StreamSearch(datum *pb.Datum, scoredDatumStream chan<- *pb.ScoredDatum, queryWaitGroup *sync.WaitGroup, config *pb.SearchConfig) error
type Node ¶
type Node struct { Version string Port uint32 Folder string KnownIds []string AdvertisedIds []string Dataset *data.Dataset ServiceList *cache.Cache PeerList *cache.Cache PeriodicTicker *time.Ticker PeriodicDone chan bool QueryUUIDCache *cache.Cache ConnectionCache *util.ConnectionCache }
func NewNode ¶
func NewNode(config *NodeConfig) *Node
func (*Node) AddPeer ¶
func (n *Node) AddPeer(ctx context.Context, in *pb.AddPeerRequest) (*pb.AddPeerResponse, error)
func (*Node) AddService ¶
func (*Node) AddStaticService ¶
func (*Node) CreateDataIfNotExists ¶
func (*Node) DataStream ¶
func (n *Node) DataStream(getDataRequest *pb.GetDataRequest, stream pb.VeriService_DataStreamServer) error
func (*Node) GetDataInfo ¶
func (*Node) GetDifferentAddressOf ¶ added in v0.0.42
func (*Node) GetNodeInfo ¶
func (*Node) Insert ¶
func (n *Node) Insert(ctx context.Context, insertionRequest *pb.InsertionRequest) (*pb.InsertionResponse, error)
func (*Node) Join ¶
func (n *Node) Join(ctx context.Context, joinRequest *pb.JoinRequest) (*pb.JoinResponse, error)
func (*Node) JoinToPeers ¶
func (*Node) PeerListItems ¶
func (*Node) Ping ¶ added in v0.0.42
func (n *Node) Ping(ctx context.Context, in *pb.PingRequest) (*pb.PingResponse, error)
func (*Node) Search ¶
func (n *Node) Search(ctx context.Context, searchRequest *pb.SearchRequest) (*pb.SearchResponse, error)
func (*Node) SearchStream ¶
func (n *Node) SearchStream(searchRequest *pb.SearchRequest, stream pb.VeriService_SearchStreamServer) error
func (*Node) SendAddPeerRequest ¶ added in v0.0.42
func (*Node) SendJoinRequest ¶
func (*Node) SendPingRequest ¶ added in v0.0.42
func (*Node) ServiceListKeys ¶
func (*Node) SetPeriodicTask ¶
func (n *Node) SetPeriodicTask()
func (*Node) StopPeriodicTask ¶
func (n *Node) StopPeriodicTask()
func (*Node) SyncWithPeers ¶
func (n *Node) SyncWithPeers()
Click to show internal directories.
Click to hide internal directories.