Documentation ¶
Index ¶
- func GetDataSourceClient(p *pb.Peer, name string) data.DataSource
- func GetIdOfPeer(p *pb.Peer) string
- func SerializeStringArray(list []string) string
- type DataSourceClient
- func (dcs *DataSourceClient) GetDataInfo() *pb.DataInfo
- func (dcs *DataSourceClient) GetID() string
- func (dcs *DataSourceClient) GetVeriServiceClient() (pb.VeriServiceClient, *grpc.ClientConn, error)
- func (dcs *DataSourceClient) Insert(datum *pb.Datum, config *pb.InsertConfig) error
- func (dcs *DataSourceClient) StreamSearch(datum *pb.Datum, scoredDatumStream chan<- *pb.ScoredDatum, ...) error
- type Node
- func (n *Node) AddPeer(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) GetNodeInfo() *pb.Peer
- 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) 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) SendJoinRequest(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 GetDataSourceClient ¶
func GetDataSourceClient(p *pb.Peer, name string) data.DataSource
func GetIdOfPeer ¶
func SerializeStringArray ¶
Types ¶
type DataSourceClient ¶
func (*DataSourceClient) GetDataInfo ¶
func (dcs *DataSourceClient) GetDataInfo() *pb.DataInfo
func (*DataSourceClient) GetID ¶
func (dcs *DataSourceClient) GetID() string
func (*DataSourceClient) GetVeriServiceClient ¶
func (dcs *DataSourceClient) GetVeriServiceClient() (pb.VeriServiceClient, *grpc.ClientConn, error)
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, stopCh <-chan struct{}, 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 }
func NewNode ¶
func NewNode(config *NodeConfig) *Node
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) 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) 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) SendJoinRequest ¶
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.