grpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext() (context.Context, context.CancelFunc)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address string) (*Client, error)

func (*Client) Cancel

func (c *Client) Cancel()

func (*Client) Close

func (c *Client) Close() error

func (*Client) DeleteDocument

func (c *Client) DeleteDocument(ids []string, opts ...grpc.CallOption) (int, error)

func (*Client) DeleteNode

func (c *Client) DeleteNode(id string, opts ...grpc.CallOption) error

func (*Client) DeleteState

func (c *Client) DeleteState(key string, opts ...grpc.CallOption) error

func (*Client) GetAddress

func (c *Client) GetAddress() string

func (*Client) GetCluster

func (c *Client) GetCluster(opts ...grpc.CallOption) (map[string]interface{}, error)

func (*Client) GetDocument

func (c *Client) GetDocument(id string, opts ...grpc.CallOption) (map[string]interface{}, error)

func (*Client) GetIndexConfig

func (c *Client) GetIndexConfig(opts ...grpc.CallOption) (*protobuf.GetIndexConfigResponse, error)

func (*Client) GetIndexStats

func (c *Client) GetIndexStats(opts ...grpc.CallOption) (*protobuf.GetIndexStatsResponse, error)

func (*Client) GetNode

func (c *Client) GetNode(id string, opts ...grpc.CallOption) (map[string]interface{}, error)

func (*Client) GetNodeMetadata

func (c *Client) GetNodeMetadata(id string, opts ...grpc.CallOption) (map[string]interface{}, error)

func (*Client) GetNodeState

func (c *Client) GetNodeState(id string, opts ...grpc.CallOption) (string, error)

func (*Client) GetState

func (c *Client) GetState(key string, opts ...grpc.CallOption) (interface{}, error)

func (*Client) IndexDocument

func (c *Client) IndexDocument(docs []map[string]interface{}, opts ...grpc.CallOption) (int, error)

func (*Client) LivenessProbe

func (c *Client) LivenessProbe(opts ...grpc.CallOption) (string, error)

func (*Client) ReadinessProbe

func (c *Client) ReadinessProbe(opts ...grpc.CallOption) (string, error)

func (*Client) Search

func (c *Client) Search(searchRequest *bleve.SearchRequest, opts ...grpc.CallOption) (*bleve.SearchResult, error)

func (*Client) SetNode

func (c *Client) SetNode(id string, metadata map[string]interface{}, opts ...grpc.CallOption) error

func (*Client) SetState

func (c *Client) SetState(key string, value interface{}, opts ...grpc.CallOption) error

func (*Client) Snapshot

func (c *Client) Snapshot(opts ...grpc.CallOption) error

func (*Client) WatchCluster

func (c *Client) WatchCluster(opts ...grpc.CallOption) (protobuf.Blast_WatchClusterClient, error)

func (*Client) WatchState

func (c *Client) WatchState(key string, opts ...grpc.CallOption) (protobuf.Blast_WatchStateClient, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(grpcAddr string, service protobuf.BlastServer, logger *log.Logger) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type Service

type Service struct{}

func (*Service) DeleteDocument

func (s *Service) DeleteDocument(stream protobuf.Blast_DeleteDocumentServer) error

func (*Service) DeleteNode

func (s *Service) DeleteNode(ctx context.Context, req *protobuf.DeleteNodeRequest) (*empty.Empty, error)

func (*Service) DeleteState

func (s *Service) DeleteState(ctx context.Context, req *protobuf.DeleteStateRequest) (*empty.Empty, error)

func (*Service) GetCluster

func (s *Service) GetCluster(ctx context.Context, req *empty.Empty) (*protobuf.GetClusterResponse, error)

func (*Service) GetDocument

func (*Service) GetIndexConfig

func (s *Service) GetIndexConfig(ctx context.Context, req *empty.Empty) (*protobuf.GetIndexConfigResponse, error)

func (*Service) GetIndexStats

func (s *Service) GetIndexStats(ctx context.Context, req *empty.Empty) (*protobuf.GetIndexStatsResponse, error)

func (*Service) GetMetadata

func (*Service) GetNode

func (*Service) GetNodeState

func (*Service) GetState

func (*Service) IndexDocument

func (s *Service) IndexDocument(stream protobuf.Blast_IndexDocumentServer) error

func (*Service) LivenessProbe

func (s *Service) LivenessProbe(ctx context.Context, req *empty.Empty) (*protobuf.LivenessProbeResponse, error)

func (*Service) ReadinessProbe

func (s *Service) ReadinessProbe(ctx context.Context, req *empty.Empty) (*protobuf.ReadinessProbeResponse, error)

func (*Service) Search

func (*Service) SetNode

func (s *Service) SetNode(ctx context.Context, req *protobuf.SetNodeRequest) (*empty.Empty, error)

func (*Service) SetState

func (s *Service) SetState(ctx context.Context, req *protobuf.SetStateRequest) (*empty.Empty, error)

func (*Service) Snapshot

func (s *Service) Snapshot(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

func (*Service) WatchCluster

func (s *Service) WatchCluster(req *empty.Empty, server protobuf.Blast_WatchClusterServer) error

func (*Service) WatchState

Jump to

Keyboard shortcuts

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