search

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package search defines a service to search for nodes from a partial VName and collection of facts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHTTPHandlers

func RegisterHTTPHandlers(ctx context.Context, s Service, mux *http.ServeMux)

RegisterHTTPHandlers registers JSON HTTP handlers with mux using the given search Service. The following method with be exposed:

GET /search
  Request: JSON encoded storage.SearchRequest
  Response: JSON encoded storage.SearchReply

Note: /search will return its response as serialized protobuf if the "proto" query parameter is set.

Types

type Service

type Service interface {
	// Search returns the matching set of nodes that match the given request.
	Search(context.Context, *spb.SearchRequest) (*spb.SearchReply, error)
}

Service to search for nodes based on a partial VName and collection of known facts.

func GRPC

GRPC returns a search Service backed by the given GRPC client and context.

func WebClient

func WebClient(addr string) Service

WebClient returns a search Service based on a remote web server.

Jump to

Keyboard shortcuts

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