rpc

package
v0.0.0-...-02ea31e Latest Latest
Warning

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

Go to latest
Published: May 30, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

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

Sender is an implementation of KVSender which exposes the Key-Value database provided by a Cockroach cluster by connecting via RPC to a Cockroach node. Overly-busy nodes will redirect this client to other nodes.

TODO(pmattis): This class is insufficiently tested and not intended for use outside of benchmarking.

func NewSender

func NewSender(server string, context *base.Context) (*Sender, error)

NewSender returns a new instance of RPCSender.

func (*Sender) Send

func (s *Sender) Send(_ context.Context, call client.Call)

Send sends call to Cockroach via an HTTP post. HTTP response codes which are retryable are retried with backoff in a loop using the default retry options. Other errors sending HTTP request are retried indefinitely using the same client command ID to avoid reporting failure when in fact the command may have gone through and been executed successfully. We retry here to eventually get through with the same client command ID and be given the cached response.

Jump to

Keyboard shortcuts

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