searchclient

package module
v0.0.0-...-f451ec7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

reference License

Augmented, high-performance search client, that combines data from kvdb storage when archives provide only pointers.

Scope

The dfuse Search service's search results contain only pointers to matching transaction data (except in live, which it brings along to avoid races).

The actual data object is stored in a database through https://github.com/dfuse-io/kvdb and its interface.

Different services querying search directly can now benefit from the optimizations of this library to speed up access to search results' full data, by resolving pointers through kvdb.

Installation & Usage

See the different protocol-specific dfuse binaries at https://github.com/dfuse-io/dfuse#protocols

Current search implementations:

Contributing

Issues and PR in this repo related strictly to the search client.

Report any protocol-specific issues in their respective repositories

Please first refer to the general dfuse contribution guide, if you wish to contribute to this code base.

License

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherTransactionPrefixesToFetch

func GatherTransactionPrefixesToFetch(items []interface{}, needsFetch func(*pbsearch.SearchMatch) bool) (prefixes []string, prefixToIndex map[string]int)

Types

type CommonClient

type CommonClient struct {
	Client pbsearch.RouterClient
}

func NewCommonClient

func NewCommonClient(cc *grpc.ClientConn) *CommonClient

func (*CommonClient) HammerToConsumer

func (c *CommonClient) HammerToConsumer(ctx context.Context, hammer *dhammer.Hammer, onItem onHammerItem, onError onHammerError)

func (*CommonClient) StreamSearchToHammer

func (c *CommonClient) StreamSearchToHammer(ctx context.Context, hammer *dhammer.Hammer, req *pbsearch.RouterRequest)

type MatchOrError

type MatchOrError struct {
	Match *pbsearch.SearchMatch
	Err   error
}

Jump to

Keyboard shortcuts

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