riakpbc

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

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

Go to latest
Published: Oct 29, 2015 License: MIT Imports: 16 Imported by: 8

README

This library is in dire need of help, and I can no longer maintain it. If you want to help, please open an issue. - mrb, 9/15/2015

riakpbc

A Riak Protocol Buffer Client in Go.

Notes

As of October 4, 2013 this library is considered to be in a 1.0-RC1 state, with a few documented near-production use cases.

Installation
$ go get github.com/mrb/riakpbc
Basic Usage
package main
import (
	"fmt"
	"log"
	"github.com/mrb/riakpbc"
)

func main() {
	// Initialize riakpbc against a 3 node cluster
	riak := riakpbc.NewClient([]string{"127.0.0.1:8087", "127.0.0.0:9089", "127.0.0.0:9090"})

	// Dial all the nodes.
	if err := riak.Dial(); err != nil {
		log.Fatalf("Dialing failed: %v", err)
	}

	// Set Client ID
	if _, err := riak.SetClientId("coolio"); err != nil {
		log.Fatalf("Setting client ID failed: %v", err)
	}

	// Store raw data (int, string, []byte)
	if _, err := riak.StoreObject("bucket", "other", "direct data"); err != nil {
		log.Println(err.Error())
	}

	// Fetch raw data (int, string, []byte)
	obj, err := riak.FetchObject("bucket", "other")
	if err != nil {
		log.Println(err.Error())
	}
	fmt.Println(string(obj.GetContent()[0].GetValue()))
	// Output:
	// direct data

	//-----------------------------------------
	// Alternatively prepare and Do() queries.
	//-----------------------------------------

	// Set Client ID
	opts1 := riak.NewSetClientIdRequest("coolio")
	if _, err := riak.Do(opts1); err != nil {
		log.Fatalf("Setting client ID failed: %v", err)
	}

	// Store raw data (int, string, []byte)
	opts2 := riak.NewStoreObjectRequest("bucket", "other")
	if _, err := riak.DoObject(opts2, "direct data"); err != nil {
		log.Println(err.Error())
	}

	// Fetch raw data (int, string, []byte)
	opts3 := riak.NewFetchObjectRequest("bucket", "other")
	objDo, err := riak.Do(opts3)
	if err != nil {
		log.Println(err.Error())
	}
	fmt.Println(string(objDo.(*riakpbc.RpbGetResp).GetContent()[0].GetValue()))
	// Output:
	// direct data

	// Close the connections if completely finished
	riak.Close()
}
Usage with a Coder
package main
import (
	"fmt"
	"log"
	"github.com/mrb/riakpbc"
)

// Note that structures use the special 'riak' tag to identify if they are an index or not.
// The correct _bin or _int index name gets appended based on the field type.
type ExampleData struct {
	Field1 string `riak:"index" json:"field1"`
	Field2 int    `json:"field2"`
}

func main() {
	// Initialize riakpbc against a 3 node cluster and with a JSON struct coder.
	//
	// Alternative marshallers can be built from this interface.
	coder := riakpbc.NewCoder("json", riakpbc.JsonMarshaller, riakpbc.JsonUnmarshaller)
	riakCoder := riakpbc.NewClientWithCoder([]string{"127.0.0.1:8087", "127.0.0.0:9089", "127.0.0.0:9090"}, coder)

	// Dial all the nodes.
	if err := riakCoder.Dial(); err != nil {
		log.Fatalf("Dialing failed: %v", err)
	}

	// Set Client ID
	if _, err := riakCoder.SetClientId("coolio"); err != nil {
		log.Fatalf("Setting client ID failed: %v", err)
	}

	// Store Struct (uses coder)
	data := ExampleData{
		Field1: "ExampleData1",
		Field2: 1,
	}
	if _, err := riakCoder.StoreStruct("bucket", "data", &data); err != nil {
		log.Println(err.Error())
	}

	// Fetch Struct (uses coder)
	out := &ExampleData{}
	if _, err := riakCoder.FetchStruct("bucket", "other", out); err != nil {
		log.Println(err.Error())
	}
	fmt.Println(out.Field1)
	// Output
	// ExampleData1

	//-----------------------------------------
	// Alternatively prepare and Do() queries.
	//-----------------------------------------

	// Store Struct (uses coder)
	opts1 := riakCoder.NewStoreStructRequest("bucket", "data")
	if _, err := riakCoder.DoStruct(opts1, &data); err != nil {
		log.Println(err.Error())
	}

	// Fetch Struct (uses coder)
	outDo := &ExampleData{}
	opts2 := riakCoder.NewFetchStructRequest("bucket", "other")
	if _, err := riakCoder.DoStruct(opts2, outDo); err != nil {
		log.Println(err.Error())
	}
	fmt.Println(outDo.Field1)
	// Output
	// ExampleData1

	// Close the connections if completely finished
	riakCoder.Close()
}
Documentation

http://godoc.org/github.com/mrb/riakpbc or go doc

Testing

go test

Benchmarks

go test -test.bench=".*"

Credits
License

riakpbc is distributed under the MIT License, see LICENSE file for details.

Documentation

Overview

Package riakpbc is a Riak Protocol Buffer client written in Go.

For details about the underlying Rpb* objects and how to use them directly consult http://docs.basho.com/riak/latest/references/apis/protocol-buffers/

Index

Examples

Constants

View Source
const (
	NODE_WRITE_RETRY     time.Duration = time.Second * 10 // 10s
	NODE_READ_RETRY      time.Duration = time.Second * 10 // 10s
	NODE_ERROR_THRESHOLD float64       = 0.5
)
View Source
const Default_RpbBucketProps_HasPostcommit bool = false
View Source
const Default_RpbBucketProps_HasPrecommit bool = false

Variables

View Source
var (
	ErrLengthZero     = errors.New("length response 0")
	ErrCorruptHeader  = errors.New("corrupt header")
	ErrObjectNotFound = errors.New("object not found")
	ErrNoSuchCommand  = errors.New("no such command")
	ErrBucketExists   = errors.New("bucket exists")
	ErrRiakError      = errors.New("riak error")
	ErrNotDone        = errors.New("not done")
	ErrReadTimeout    = errors.New("read timeout")
	ErrWriteTimeout   = errors.New("write timeout")
	ErrZeroNodes      = errors.New("zero nodes in pool")
	ErrNoContent      = errors.New("no content")
	ErrAllNodesDown   = errors.New("all nodes down")
)
View Source
var RpbBucketProps_RpbReplMode_name = map[int32]string{
	0: "FALSE",
	1: "REALTIME",
	2: "FULLSYNC",
	3: "TRUE",
}
View Source
var RpbBucketProps_RpbReplMode_value = map[string]int32{
	"FALSE":    0,
	"REALTIME": 1,
	"FULLSYNC": 2,
	"TRUE":     3,
}
View Source
var RpbIndexReq_IndexQueryType_name = map[int32]string{
	0: "eq",
	1: "range",
}
View Source
var RpbIndexReq_IndexQueryType_value = map[string]int32{
	"eq":    0,
	"range": 1,
}

Functions

func JsonMarshaller

func JsonMarshaller(in interface{}, out *RpbContent) error

JsonMarshaller is an example of a MarshalMethod that is passed to NewEncode().

If a different data marshaller is desired, such as XML, YAML, etc. Use this as a template.

func JsonUnmarshaller

func JsonUnmarshaller(in []byte, out interface{}) error

JsonUnmarshaller is an example of an UnmarshallMethod that is passed to NewEncode().

Types

type Client

type Client struct {
	Coder *Coder // Coder for (un)marshalling data
	// contains filtered or unexported fields
}
Example
// Initialize riakpbc against a 3 node cluster
riak := NewClient([]string{"127.0.0.1:8087", "127.0.0.0:9089", "127.0.0.0:9090"})

// Dial all the nodes.
if err := riak.Dial(); err != nil {
	log.Fatalf("Dialing failed: %v", err)
}

// Set Client ID
if _, err := riak.SetClientId("coolio"); err != nil {
	log.Fatalf("Setting client ID failed: %v", err)
}

// Store raw data (int, string, []byte)
if _, err := riak.StoreObject("bucket", "other", "direct data"); err != nil {
	log.Println(err.Error())
}

// Fetch raw data (int, string, []byte)
obj, err := riak.FetchObject("bucket", "other")
if err != nil {
	log.Println(err.Error())
}
fmt.Println(string(obj.GetContent()[0].GetValue()))
// Output:
// direct data

// Alternatively prepare and Do() queries.

// Set Client ID
opts1 := riak.NewSetClientIdRequest("coolio")
if _, err := riak.Do(opts1); err != nil {
	log.Fatalf("Setting client ID failed: %v", err)
}

// Store raw data (int, string, []byte)
opts2 := riak.NewStoreObjectRequest("bucket", "other")
if _, err := riak.DoObject(opts2, "direct data"); err != nil {
	log.Println(err.Error())
}

// Fetch raw data (int, string, []byte)
opts3 := riak.NewFetchObjectRequest("bucket", "other")
objDo, err := riak.Do(opts3)
if err != nil {
	log.Println(err.Error())
}
fmt.Println(string(objDo.(*RpbGetResp).GetContent()[0].GetValue()))

func NewClient

func NewClient(cluster []string) *Client

NewClient accepts a slice of node address strings and returns a Client object.

Illegally addressed nodes will be rejected in the NewPool call.

func NewClientWithCoder

func NewClientWithCoder(cluster []string, coder *Coder) *Client

NewClientWihtCoder accepts a slice of node address strings, a Coder for processing structs into data, and returns a Client object.

Illegally addressed nodes will be rejected in the NewPool call.

func (*Client) BackgroundNodePing

func (c *Client) BackgroundNodePing()

func (*Client) Close

func (c *Client) Close()

Close closes the node TCP connections.

func (*Client) DeleteObject

func (c *Client) DeleteObject(bucket, key string) ([]byte, error)

DeleteObject removes object with key from bucket.

func (*Client) Dial

func (c *Client) Dial() error

Dial connects all nodes in the pool to their addresses via TCP.

Nodes which are down get set to redial in the background.

func (*Client) DisableLogging

func (c *Client) DisableLogging()

Disables logging for client

func (*Client) Do

func (c *Client) Do(opts interface{}) (interface{}, error)

Do executes a prepared query and returns the results.

func (*Client) DoObject

func (c *Client) DoObject(opts interface{}, in interface{}) (interface{}, error)

DoObject executes a prepared query with data and returns the results.

func (*Client) DoStruct

func (c *Client) DoStruct(opts interface{}, in interface{}) (interface{}, error)

DoStruct executes a prepared query on a struct with the coder and returns the results.

func (*Client) EnableLogging

func (c *Client) EnableLogging()

Enables logging for client

func (*Client) FetchObject

func (c *Client) FetchObject(bucket, key string) (*RpbGetResp, error)

FetchObject returns an object from a bucket and returns a RpbGetResp response.

func (*Client) FetchStruct

func (c *Client) FetchStruct(bucket, key string, out interface{}) (*RpbGetResp, error)

FetchStruct returns an object from a bucket and unmarshals it into the passed struct.

Pass RpbGetReq to SetOpts for optional parameters.

func (*Client) GetBucket

func (c *Client) GetBucket(bucket string) (*RpbGetBucketResp, error)

GetBucket gets the bucket info.

func (*Client) GetClientId

func (c *Client) GetClientId() (*RpbGetClientIdResp, error)

GetClientId returns the client ID.

func (*Client) GetServerInfo

func (c *Client) GetServerInfo() (*RpbGetServerInfoResp, error)

GetServerInfo returns the server info.

func (*Client) Index

func (c *Client) Index(bucket, index, key, start, end string) (*RpbIndexResp, error)

Index requests a set of keys that match a secondary index query.

qtype - an IndexQueryType of either 0 (eq) or 1 (range)

func (*Client) LinkAdd

func (c *Client) LinkAdd(bucket, key, lbucket, lkey, ltag string) error

LinkAdd sets a link reference to the link bucket/key in bucket/key.

Note that this can be manually done by passing RpbContent to StoreObject.

func (*Client) LinkRemove

func (c *Client) LinkRemove(bucket, key, lbucket, lkey string) error

LinkRemove removes the associated link bucket/key from the bucket/key.

func (*Client) LinkWalk

func (c *Client) LinkWalk(bucket, key string) (*RpbGetResp, error)

LinkWalk is just a synonymn for FetchObject. It expects the link bucket/key.

func (*Client) ListBuckets

func (c *Client) ListBuckets() (*RpbListBucketsResp, error)

ListBuckets lists all buckets.

func (*Client) ListKeys

func (c *Client) ListKeys(bucket string) ([][]byte, error)

ListKeys lists all keys from bucket.

func (*Client) LoggingEnabled

func (c *Client) LoggingEnabled() bool

Tests whether logging is enabled for client

func (*Client) MapReduce

func (c *Client) MapReduce(request, contentType string) ([]byte, error)

MapReduce executes a MapReduce job.

Encodings:

  • application/json - JSON-encoded map/reduce job
  • application/x-erlang-binary - Erlang external term format

func (*Client) NewDeleteObjectRequest

func (c *Client) NewDeleteObjectRequest(bucket, key string) *RpbDelReq

NewDeleteObjectRequest prepares a DeleteObject request.

func (*Client) NewFetchObjectRequest

func (c *Client) NewFetchObjectRequest(bucket, key string) *RpbGetReq

NewFetchObjectRequest prepares a FetchObject request.

func (*Client) NewFetchStructRequest

func (c *Client) NewFetchStructRequest(bucket, key string) *RpbGetReq

NewFetchStructRequest prepares a FetchStruct request.

func (*Client) NewGetBucketRequest

func (c *Client) NewGetBucketRequest(bucket string) *RpbGetBucketReq

NewGetBucketRequest prepares a GetBucket request.

func (*Client) NewIndexRequest

func (c *Client) NewIndexRequest(bucket, index, key, start, end string) *RpbIndexReq

NewIndexRequest prepares a new Index request.

func (*Client) NewListKeysRequest

func (c *Client) NewListKeysRequest(bucket string) *RpbListKeysReq

NewListKeysRequest prepares a ListKeys request.

func (*Client) NewMapReduceRequest

func (c *Client) NewMapReduceRequest(request, contentType string) *RpbMapRedReq

NewMapReduceRequest prepares a new MapReduce request.

func (*Client) NewSearchRequest

func (c *Client) NewSearchRequest(index, q string) *RpbSearchQueryReq

NewSearchRequest prepares a new Search request.

func (*Client) NewSetBucketRequest

func (c *Client) NewSetBucketRequest(bucket string, nval *uint32, allowmult *bool) *RpbSetBucketReq

NewSetBucketRequest prepares a SetBucket request.

func (*Client) NewSetClientIdRequest

func (c *Client) NewSetClientIdRequest(clientId string) *RpbSetClientIdReq

NewSetClientIdRequest prepares a new SetClientId request.

func (*Client) NewStoreObjectRequest

func (c *Client) NewStoreObjectRequest(bucket, key string) *RpbPutReq

NewStoreObjectRequest prepares a StoreObject request.

func (*Client) NewStoreStructRequest

func (c *Client) NewStoreStructRequest(bucket, key string) *RpbPutReq

NewStoreStructRequest prepares a StoreStruct request.

func (*Client) Ping

func (c *Client) Ping() ([]byte, error)

Ping the server.

func (*Client) Pool

func (c *Client) Pool() *Pool

Pool returns the pool associated with the client.

func (*Client) ReqMultiResp

func (c *Client) ReqMultiResp(reqstruct interface{}, structname string) (response interface{}, err error)

ReqMultiResp is the top level interface for the client for the few operations which have to hit the server multiple times to guarantee a complete response: List keys, Map Reduce, etc.

func (*Client) ReqResp

func (c *Client) ReqResp(reqstruct interface{}, structname string, raw bool) (response interface{}, err error)

ReqResp is the top level interface for the client for a bulk of Riak operations

func (*Client) Search

func (c *Client) Search(index, q string) (*RpbSearchQueryResp, error)

Search scans bucket for query string q and searches index for the match.

func (*Client) SelectNode

func (c *Client) SelectNode() (*Node, error)

SelectNode selects a node from the pool, see *Pool.SelectNode()

func (*Client) SetBucket

func (c *Client) SetBucket(bucket string, nval *uint32, allowmult *bool) ([]byte, error)

SetBucket sets the bucket info.

func (*Client) SetClientId

func (c *Client) SetClientId(clientId string) ([]byte, error)

SetClientId sets the client ID.

func (*Client) StoreObject

func (c *Client) StoreObject(bucket, key string, in interface{}) (*RpbPutResp, error)

StoreObject puts an object with key into bucket and returns a RpbGetResp response.

The `in` content can be passed as either a RpbContent, string, int, or []byte.

Use RpbContent if you need absolute control over what is going into Riak.

func (*Client) StoreStruct

func (c *Client) StoreStruct(bucket, key string, in interface{}) (*RpbPutResp, error)

StoreStruct marshals the data from a struct, and adds it with key into bucket.

Check Coder.Marshall() for `riak` tags that can be set on a structure for automated indexes and links.

type Coder

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

Coder contains a tag, marshaller, and unmarshaller. It's primary duty is to convert data from `tag` format to and from a composed struct.

func NewCoder

func NewCoder(tag string, marshaller MarshalMethod, unmarshaller UnmarshalMethod) *Coder

NewCoder requires a tag and MarshalMethod.

func (*Coder) Marshal

func (self *Coder) Marshal(data interface{}) (*RpbContent, error)

Marshal takes a struct with `riak` tagged fields and builds the correct RpbContent to send along to Riak.

Any fields of type string are set as a _bin index, and fields of any int type set to an _int index.

Examples:

// Field is a _bin index
Field string `riak:"index"`

// Field is an _int index
Field int `riak:"index"`

// Field is a _bin index and also a json field in the actual data.
Field string `json:"field" riak:"index"`

TODO: The PBC int interface doesn't seem to work directly with byte data, even though the API specification is byte data. Needs to be investigated further.

Update: August 3, 2013 Apparently the only way to get this to work is to treat _int index values as strings.

func (*Coder) Unmarshal

func (self *Coder) Unmarshal(in []byte, data interface{}) error

Unmarshal unwraps the database data into the passed structure based on the defined marshaller.

type Decaying

type Decaying struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Thanks to @aphyr and @seancribbs for their work on: https://github.com/basho/riak-ruby-client Which directly inspired this implementation

func NewDecaying

func NewDecaying() *Decaying

NewDecaying returns a new decaying error rate object - the value of `p` reduces, be default 50% every 10 seconds. This gives us a nice, tunable way to control our interactions with nodes. Errors are recorded and then `p` is used as a threshold to see if a node is 'good'

func (*Decaying) Add

func (decaying *Decaying) Add(d float64)

Add icnrements the `p` value of the decaying error object

func (*Decaying) Value

func (decaying *Decaying) Value() float64

Value is the current value of this decaying error value - the time since it was created is stored for adjustment.

type MarshalMethod

type MarshalMethod func(interface{}, *RpbContent) error

MarshalMethod is the method signature of a marshaller.

type Node

type Node struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewNode

func NewNode(addr string, readTimeout, writeTimeout time.Duration) (*Node, error)

Returns a new Node.

func (*Node) Close

func (node *Node) Close()

Close the connection

func (*Node) Dial

func (node *Node) Dial() (err error)

Dial connects to a single riak node.

func (*Node) ErrorRate

func (node *Node) ErrorRate() float64

ErrorRate safely returns the current Node's error rate.

func (*Node) GetOk

func (node *Node) GetOk() bool

func (*Node) IsConnected

func (node *Node) IsConnected() bool

func (*Node) Ping

func (node *Node) Ping() bool

func (*Node) RecordError

func (node *Node) RecordError(amount float64)

RecordError increments the current error value - see decaying.go

func (*Node) ReqMultiResp

func (node *Node) ReqMultiResp(reqstruct interface{}, structname string) (response interface{}, err error)

func (*Node) ReqResp

func (node *Node) ReqResp(reqstruct interface{}, structname string, raw bool) (response interface{}, err error)

func (*Node) SetOk

func (node *Node) SetOk(ok bool)

type Pool

type Pool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPool

func NewPool(cluster []string) *Pool

NewPool returns an instantiated pool given a slice of node addresses.

func (*Pool) Close

func (pool *Pool) Close()

func (*Pool) Ping

func (pool *Pool) Ping()

func (*Pool) SelectNode

func (pool *Pool) SelectNode() (*Node, error)

SelectNode returns a node from the pool using weighted error selection.

Each node has an assignable error rate, which is incremented when an error occurs, and decays over time - 50% each 10 seconds by default.

func (*Pool) Size

func (pool *Pool) Size() int

func (*Pool) String

func (pool *Pool) String() string

type RpbBucketProps

type RpbBucketProps struct {
	NVal             *uint32                     `protobuf:"varint,1,opt,name=n_val" json:"n_val,omitempty"`
	AllowMult        *bool                       `protobuf:"varint,2,opt,name=allow_mult" json:"allow_mult,omitempty"`
	LastWriteWins    *bool                       `protobuf:"varint,3,opt,name=last_write_wins" json:"last_write_wins,omitempty"`
	Precommit        []*RpbCommitHook            `protobuf:"bytes,4,rep,name=precommit" json:"precommit,omitempty"`
	HasPrecommit     *bool                       `protobuf:"varint,5,opt,name=has_precommit,def=0" json:"has_precommit,omitempty"`
	Postcommit       []*RpbCommitHook            `protobuf:"bytes,6,rep,name=postcommit" json:"postcommit,omitempty"`
	HasPostcommit    *bool                       `protobuf:"varint,7,opt,name=has_postcommit,def=0" json:"has_postcommit,omitempty"`
	ChashKeyfun      *RpbModFun                  `protobuf:"bytes,8,opt,name=chash_keyfun" json:"chash_keyfun,omitempty"`
	Linkfun          *RpbModFun                  `protobuf:"bytes,9,opt,name=linkfun" json:"linkfun,omitempty"`
	OldVclock        *uint32                     `protobuf:"varint,10,opt,name=old_vclock" json:"old_vclock,omitempty"`
	YoungVclock      *uint32                     `protobuf:"varint,11,opt,name=young_vclock" json:"young_vclock,omitempty"`
	BigVclock        *uint32                     `protobuf:"varint,12,opt,name=big_vclock" json:"big_vclock,omitempty"`
	SmallVclock      *uint32                     `protobuf:"varint,13,opt,name=small_vclock" json:"small_vclock,omitempty"`
	Pr               *uint32                     `protobuf:"varint,14,opt,name=pr" json:"pr,omitempty"`
	R                *uint32                     `protobuf:"varint,15,opt,name=r" json:"r,omitempty"`
	W                *uint32                     `protobuf:"varint,16,opt,name=w" json:"w,omitempty"`
	Pw               *uint32                     `protobuf:"varint,17,opt,name=pw" json:"pw,omitempty"`
	Dw               *uint32                     `protobuf:"varint,18,opt,name=dw" json:"dw,omitempty"`
	Rw               *uint32                     `protobuf:"varint,19,opt,name=rw" json:"rw,omitempty"`
	BasicQuorum      *bool                       `protobuf:"varint,20,opt,name=basic_quorum" json:"basic_quorum,omitempty"`
	NotfoundOk       *bool                       `protobuf:"varint,21,opt,name=notfound_ok" json:"notfound_ok,omitempty"`
	Backend          []byte                      `protobuf:"bytes,22,opt,name=backend" json:"backend,omitempty"`
	Search           *bool                       `protobuf:"varint,23,opt,name=search" json:"search,omitempty"`
	Repl             *RpbBucketProps_RpbReplMode `protobuf:"varint,24,opt,name=repl,enum=RpbBucketProps_RpbReplMode" json:"repl,omitempty"`
	XXX_unrecognized []byte                      `json:"-"`
}

func (*RpbBucketProps) GetAllowMult

func (m *RpbBucketProps) GetAllowMult() bool

func (*RpbBucketProps) GetBackend

func (m *RpbBucketProps) GetBackend() []byte

func (*RpbBucketProps) GetBasicQuorum

func (m *RpbBucketProps) GetBasicQuorum() bool

func (*RpbBucketProps) GetBigVclock

func (m *RpbBucketProps) GetBigVclock() uint32

func (*RpbBucketProps) GetChashKeyfun

func (m *RpbBucketProps) GetChashKeyfun() *RpbModFun

func (*RpbBucketProps) GetDw

func (m *RpbBucketProps) GetDw() uint32

func (*RpbBucketProps) GetHasPostcommit

func (m *RpbBucketProps) GetHasPostcommit() bool

func (*RpbBucketProps) GetHasPrecommit

func (m *RpbBucketProps) GetHasPrecommit() bool

func (*RpbBucketProps) GetLastWriteWins

func (m *RpbBucketProps) GetLastWriteWins() bool

func (*RpbBucketProps) GetLinkfun

func (m *RpbBucketProps) GetLinkfun() *RpbModFun

func (*RpbBucketProps) GetNVal

func (m *RpbBucketProps) GetNVal() uint32

func (*RpbBucketProps) GetNotfoundOk

func (m *RpbBucketProps) GetNotfoundOk() bool

func (*RpbBucketProps) GetOldVclock

func (m *RpbBucketProps) GetOldVclock() uint32

func (*RpbBucketProps) GetPostcommit

func (m *RpbBucketProps) GetPostcommit() []*RpbCommitHook

func (*RpbBucketProps) GetPr

func (m *RpbBucketProps) GetPr() uint32

func (*RpbBucketProps) GetPrecommit

func (m *RpbBucketProps) GetPrecommit() []*RpbCommitHook

func (*RpbBucketProps) GetPw

func (m *RpbBucketProps) GetPw() uint32

func (*RpbBucketProps) GetR

func (m *RpbBucketProps) GetR() uint32

func (*RpbBucketProps) GetRepl

func (*RpbBucketProps) GetRw

func (m *RpbBucketProps) GetRw() uint32

func (*RpbBucketProps) GetSearch

func (m *RpbBucketProps) GetSearch() bool

func (*RpbBucketProps) GetSmallVclock

func (m *RpbBucketProps) GetSmallVclock() uint32

func (*RpbBucketProps) GetW

func (m *RpbBucketProps) GetW() uint32

func (*RpbBucketProps) GetYoungVclock

func (m *RpbBucketProps) GetYoungVclock() uint32

func (*RpbBucketProps) ProtoMessage

func (*RpbBucketProps) ProtoMessage()

func (*RpbBucketProps) Reset

func (m *RpbBucketProps) Reset()

func (*RpbBucketProps) String

func (m *RpbBucketProps) String() string

type RpbBucketProps_RpbReplMode

type RpbBucketProps_RpbReplMode int32
const (
	RpbBucketProps_FALSE    RpbBucketProps_RpbReplMode = 0
	RpbBucketProps_REALTIME RpbBucketProps_RpbReplMode = 1
	RpbBucketProps_FULLSYNC RpbBucketProps_RpbReplMode = 2
	RpbBucketProps_TRUE     RpbBucketProps_RpbReplMode = 3
)

func (RpbBucketProps_RpbReplMode) Enum

func (RpbBucketProps_RpbReplMode) MarshalJSON

func (x RpbBucketProps_RpbReplMode) MarshalJSON() ([]byte, error)

func (RpbBucketProps_RpbReplMode) String

func (*RpbBucketProps_RpbReplMode) UnmarshalJSON

func (x *RpbBucketProps_RpbReplMode) UnmarshalJSON(data []byte) error

type RpbCommitHook

type RpbCommitHook struct {
	Modfun           *RpbModFun `protobuf:"bytes,1,opt,name=modfun" json:"modfun,omitempty"`
	Name             []byte     `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

func (*RpbCommitHook) GetModfun

func (m *RpbCommitHook) GetModfun() *RpbModFun

func (*RpbCommitHook) GetName

func (m *RpbCommitHook) GetName() []byte

func (*RpbCommitHook) ProtoMessage

func (*RpbCommitHook) ProtoMessage()

func (*RpbCommitHook) Reset

func (m *RpbCommitHook) Reset()

func (*RpbCommitHook) String

func (m *RpbCommitHook) String() string

type RpbContent

type RpbContent struct {
	Value            []byte     `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
	ContentType      []byte     `protobuf:"bytes,2,opt,name=content_type" json:"content_type,omitempty"`
	Charset          []byte     `protobuf:"bytes,3,opt,name=charset" json:"charset,omitempty"`
	ContentEncoding  []byte     `protobuf:"bytes,4,opt,name=content_encoding" json:"content_encoding,omitempty"`
	Vtag             []byte     `protobuf:"bytes,5,opt,name=vtag" json:"vtag,omitempty"`
	Links            []*RpbLink `protobuf:"bytes,6,rep,name=links" json:"links,omitempty"`
	LastMod          *uint32    `protobuf:"varint,7,opt,name=last_mod" json:"last_mod,omitempty"`
	LastModUsecs     *uint32    `protobuf:"varint,8,opt,name=last_mod_usecs" json:"last_mod_usecs,omitempty"`
	Usermeta         []*RpbPair `protobuf:"bytes,9,rep,name=usermeta" json:"usermeta,omitempty"`
	Indexes          []*RpbPair `protobuf:"bytes,10,rep,name=indexes" json:"indexes,omitempty"`
	Deleted          *bool      `protobuf:"varint,11,opt,name=deleted" json:"deleted,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

func (*RpbContent) GetCharset

func (m *RpbContent) GetCharset() []byte

func (*RpbContent) GetContentEncoding

func (m *RpbContent) GetContentEncoding() []byte

func (*RpbContent) GetContentType

func (m *RpbContent) GetContentType() []byte

func (*RpbContent) GetDeleted

func (m *RpbContent) GetDeleted() bool

func (*RpbContent) GetIndexes

func (m *RpbContent) GetIndexes() []*RpbPair

func (*RpbContent) GetLastMod

func (m *RpbContent) GetLastMod() uint32

func (*RpbContent) GetLastModUsecs

func (m *RpbContent) GetLastModUsecs() uint32
func (m *RpbContent) GetLinks() []*RpbLink

func (*RpbContent) GetUsermeta

func (m *RpbContent) GetUsermeta() []*RpbPair

func (*RpbContent) GetValue

func (m *RpbContent) GetValue() []byte

func (*RpbContent) GetVtag

func (m *RpbContent) GetVtag() []byte

func (*RpbContent) ProtoMessage

func (*RpbContent) ProtoMessage()

func (*RpbContent) Reset

func (m *RpbContent) Reset()

func (*RpbContent) String

func (m *RpbContent) String() string

type RpbDelReq

type RpbDelReq struct {
	Bucket           []byte  `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Key              []byte  `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	Rw               *uint32 `protobuf:"varint,3,opt,name=rw" json:"rw,omitempty"`
	Vclock           []byte  `protobuf:"bytes,4,opt,name=vclock" json:"vclock,omitempty"`
	R                *uint32 `protobuf:"varint,5,opt,name=r" json:"r,omitempty"`
	W                *uint32 `protobuf:"varint,6,opt,name=w" json:"w,omitempty"`
	Pr               *uint32 `protobuf:"varint,7,opt,name=pr" json:"pr,omitempty"`
	Pw               *uint32 `protobuf:"varint,8,opt,name=pw" json:"pw,omitempty"`
	Dw               *uint32 `protobuf:"varint,9,opt,name=dw" json:"dw,omitempty"`
	Timeout          *uint32 `protobuf:"varint,10,opt,name=timeout" json:"timeout,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RpbDelReq) GetBucket

func (m *RpbDelReq) GetBucket() []byte

func (*RpbDelReq) GetDw

func (m *RpbDelReq) GetDw() uint32

func (*RpbDelReq) GetKey

func (m *RpbDelReq) GetKey() []byte

func (*RpbDelReq) GetPr

func (m *RpbDelReq) GetPr() uint32

func (*RpbDelReq) GetPw

func (m *RpbDelReq) GetPw() uint32

func (*RpbDelReq) GetR

func (m *RpbDelReq) GetR() uint32

func (*RpbDelReq) GetRw

func (m *RpbDelReq) GetRw() uint32

func (*RpbDelReq) GetTimeout

func (m *RpbDelReq) GetTimeout() uint32

func (*RpbDelReq) GetVclock

func (m *RpbDelReq) GetVclock() []byte

func (*RpbDelReq) GetW

func (m *RpbDelReq) GetW() uint32

func (*RpbDelReq) ProtoMessage

func (*RpbDelReq) ProtoMessage()

func (*RpbDelReq) Reset

func (m *RpbDelReq) Reset()

func (*RpbDelReq) String

func (m *RpbDelReq) String() string

type RpbEmptyResp

type RpbEmptyResp struct{}

type RpbErrorResp

type RpbErrorResp struct {
	Errmsg           []byte  `protobuf:"bytes,1,req,name=errmsg" json:"errmsg,omitempty"`
	Errcode          *uint32 `protobuf:"varint,2,req,name=errcode" json:"errcode,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RpbErrorResp) GetErrcode

func (m *RpbErrorResp) GetErrcode() uint32

func (*RpbErrorResp) GetErrmsg

func (m *RpbErrorResp) GetErrmsg() []byte

func (*RpbErrorResp) ProtoMessage

func (*RpbErrorResp) ProtoMessage()

func (*RpbErrorResp) Reset

func (m *RpbErrorResp) Reset()

func (*RpbErrorResp) String

func (m *RpbErrorResp) String() string

type RpbGetBucketReq

type RpbGetBucketReq struct {
	Bucket           []byte `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbGetBucketReq) GetBucket

func (m *RpbGetBucketReq) GetBucket() []byte

func (*RpbGetBucketReq) ProtoMessage

func (*RpbGetBucketReq) ProtoMessage()

func (*RpbGetBucketReq) Reset

func (m *RpbGetBucketReq) Reset()

func (*RpbGetBucketReq) String

func (m *RpbGetBucketReq) String() string

type RpbGetBucketResp

type RpbGetBucketResp struct {
	Props            *RpbBucketProps `protobuf:"bytes,1,req,name=props" json:"props,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

func (*RpbGetBucketResp) GetProps

func (m *RpbGetBucketResp) GetProps() *RpbBucketProps

func (*RpbGetBucketResp) ProtoMessage

func (*RpbGetBucketResp) ProtoMessage()

func (*RpbGetBucketResp) Reset

func (m *RpbGetBucketResp) Reset()

func (*RpbGetBucketResp) String

func (m *RpbGetBucketResp) String() string

type RpbGetClientIdResp

type RpbGetClientIdResp struct {
	ClientId         []byte `protobuf:"bytes,1,req,name=client_id" json:"client_id,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbGetClientIdResp) GetClientId

func (m *RpbGetClientIdResp) GetClientId() []byte

func (*RpbGetClientIdResp) ProtoMessage

func (*RpbGetClientIdResp) ProtoMessage()

func (*RpbGetClientIdResp) Reset

func (m *RpbGetClientIdResp) Reset()

func (*RpbGetClientIdResp) String

func (m *RpbGetClientIdResp) String() string

type RpbGetReq

type RpbGetReq struct {
	Bucket           []byte  `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Key              []byte  `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	R                *uint32 `protobuf:"varint,3,opt,name=r" json:"r,omitempty"`
	Pr               *uint32 `protobuf:"varint,4,opt,name=pr" json:"pr,omitempty"`
	BasicQuorum      *bool   `protobuf:"varint,5,opt,name=basic_quorum" json:"basic_quorum,omitempty"`
	NotfoundOk       *bool   `protobuf:"varint,6,opt,name=notfound_ok" json:"notfound_ok,omitempty"`
	IfModified       []byte  `protobuf:"bytes,7,opt,name=if_modified" json:"if_modified,omitempty"`
	Head             *bool   `protobuf:"varint,8,opt,name=head" json:"head,omitempty"`
	Deletedvclock    *bool   `protobuf:"varint,9,opt,name=deletedvclock" json:"deletedvclock,omitempty"`
	Timeout          *uint32 `protobuf:"varint,10,opt,name=timeout" json:"timeout,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RpbGetReq) GetBasicQuorum

func (m *RpbGetReq) GetBasicQuorum() bool

func (*RpbGetReq) GetBucket

func (m *RpbGetReq) GetBucket() []byte

func (*RpbGetReq) GetDeletedvclock

func (m *RpbGetReq) GetDeletedvclock() bool

func (*RpbGetReq) GetHead

func (m *RpbGetReq) GetHead() bool

func (*RpbGetReq) GetIfModified

func (m *RpbGetReq) GetIfModified() []byte

func (*RpbGetReq) GetKey

func (m *RpbGetReq) GetKey() []byte

func (*RpbGetReq) GetNotfoundOk

func (m *RpbGetReq) GetNotfoundOk() bool

func (*RpbGetReq) GetPr

func (m *RpbGetReq) GetPr() uint32

func (*RpbGetReq) GetR

func (m *RpbGetReq) GetR() uint32

func (*RpbGetReq) GetTimeout

func (m *RpbGetReq) GetTimeout() uint32

func (*RpbGetReq) ProtoMessage

func (*RpbGetReq) ProtoMessage()

func (*RpbGetReq) Reset

func (m *RpbGetReq) Reset()

func (*RpbGetReq) String

func (m *RpbGetReq) String() string

type RpbGetResp

type RpbGetResp struct {
	Content          []*RpbContent `protobuf:"bytes,1,rep,name=content" json:"content,omitempty"`
	Vclock           []byte        `protobuf:"bytes,2,opt,name=vclock" json:"vclock,omitempty"`
	Unchanged        *bool         `protobuf:"varint,3,opt,name=unchanged" json:"unchanged,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func (*RpbGetResp) GetContent

func (m *RpbGetResp) GetContent() []*RpbContent

func (*RpbGetResp) GetUnchanged

func (m *RpbGetResp) GetUnchanged() bool

func (*RpbGetResp) GetVclock

func (m *RpbGetResp) GetVclock() []byte

func (*RpbGetResp) ProtoMessage

func (*RpbGetResp) ProtoMessage()

func (*RpbGetResp) Reset

func (m *RpbGetResp) Reset()

func (*RpbGetResp) String

func (m *RpbGetResp) String() string

type RpbGetServerInfoResp

type RpbGetServerInfoResp struct {
	Node             []byte `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
	ServerVersion    []byte `protobuf:"bytes,2,opt,name=server_version" json:"server_version,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbGetServerInfoResp) GetNode

func (m *RpbGetServerInfoResp) GetNode() []byte

func (*RpbGetServerInfoResp) GetServerVersion

func (m *RpbGetServerInfoResp) GetServerVersion() []byte

func (*RpbGetServerInfoResp) ProtoMessage

func (*RpbGetServerInfoResp) ProtoMessage()

func (*RpbGetServerInfoResp) Reset

func (m *RpbGetServerInfoResp) Reset()

func (*RpbGetServerInfoResp) String

func (m *RpbGetServerInfoResp) String() string

type RpbIndexReq

type RpbIndexReq struct {
	Bucket           []byte                      `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Index            []byte                      `protobuf:"bytes,2,req,name=index" json:"index,omitempty"`
	Qtype            *RpbIndexReq_IndexQueryType `protobuf:"varint,3,req,name=qtype,enum=RpbIndexReq_IndexQueryType" json:"qtype,omitempty"`
	Key              []byte                      `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"`
	RangeMin         []byte                      `protobuf:"bytes,5,opt,name=range_min" json:"range_min,omitempty"`
	RangeMax         []byte                      `protobuf:"bytes,6,opt,name=range_max" json:"range_max,omitempty"`
	XXX_unrecognized []byte                      `json:"-"`
}

func (*RpbIndexReq) GetBucket

func (m *RpbIndexReq) GetBucket() []byte

func (*RpbIndexReq) GetIndex

func (m *RpbIndexReq) GetIndex() []byte

func (*RpbIndexReq) GetKey

func (m *RpbIndexReq) GetKey() []byte

func (*RpbIndexReq) GetQtype

func (*RpbIndexReq) GetRangeMax

func (m *RpbIndexReq) GetRangeMax() []byte

func (*RpbIndexReq) GetRangeMin

func (m *RpbIndexReq) GetRangeMin() []byte

func (*RpbIndexReq) ProtoMessage

func (*RpbIndexReq) ProtoMessage()

func (*RpbIndexReq) Reset

func (m *RpbIndexReq) Reset()

func (*RpbIndexReq) String

func (m *RpbIndexReq) String() string

type RpbIndexReq_IndexQueryType

type RpbIndexReq_IndexQueryType int32
const (
	RpbIndexReq_eq    RpbIndexReq_IndexQueryType = 0
	RpbIndexReq_range RpbIndexReq_IndexQueryType = 1
)

func (RpbIndexReq_IndexQueryType) Enum

func (RpbIndexReq_IndexQueryType) MarshalJSON

func (x RpbIndexReq_IndexQueryType) MarshalJSON() ([]byte, error)

func (RpbIndexReq_IndexQueryType) String

func (*RpbIndexReq_IndexQueryType) UnmarshalJSON

func (x *RpbIndexReq_IndexQueryType) UnmarshalJSON(data []byte) error

type RpbIndexResp

type RpbIndexResp struct {
	Keys             [][]byte `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*RpbIndexResp) GetKeys

func (m *RpbIndexResp) GetKeys() [][]byte

func (*RpbIndexResp) ProtoMessage

func (*RpbIndexResp) ProtoMessage()

func (*RpbIndexResp) Reset

func (m *RpbIndexResp) Reset()

func (*RpbIndexResp) String

func (m *RpbIndexResp) String() string
type RpbLink struct {
	Bucket           []byte `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
	Key              []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Tag              []byte `protobuf:"bytes,3,opt,name=tag" json:"tag,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbLink) GetBucket

func (m *RpbLink) GetBucket() []byte

func (*RpbLink) GetKey

func (m *RpbLink) GetKey() []byte

func (*RpbLink) GetTag

func (m *RpbLink) GetTag() []byte

func (*RpbLink) ProtoMessage

func (*RpbLink) ProtoMessage()

func (*RpbLink) Reset

func (m *RpbLink) Reset()

func (*RpbLink) String

func (m *RpbLink) String() string

type RpbListBucketsResp

type RpbListBucketsResp struct {
	Buckets          [][]byte `protobuf:"bytes,1,rep,name=buckets" json:"buckets,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*RpbListBucketsResp) GetBuckets

func (m *RpbListBucketsResp) GetBuckets() [][]byte

func (*RpbListBucketsResp) ProtoMessage

func (*RpbListBucketsResp) ProtoMessage()

func (*RpbListBucketsResp) Reset

func (m *RpbListBucketsResp) Reset()

func (*RpbListBucketsResp) String

func (m *RpbListBucketsResp) String() string

type RpbListKeysReq

type RpbListKeysReq struct {
	Bucket           []byte `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbListKeysReq) GetBucket

func (m *RpbListKeysReq) GetBucket() []byte

func (*RpbListKeysReq) ProtoMessage

func (*RpbListKeysReq) ProtoMessage()

func (*RpbListKeysReq) Reset

func (m *RpbListKeysReq) Reset()

func (*RpbListKeysReq) String

func (m *RpbListKeysReq) String() string

type RpbListKeysResp

type RpbListKeysResp struct {
	Keys             [][]byte `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
	Done             *bool    `protobuf:"varint,2,opt,name=done" json:"done,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*RpbListKeysResp) GetDone

func (m *RpbListKeysResp) GetDone() bool

func (*RpbListKeysResp) GetKeys

func (m *RpbListKeysResp) GetKeys() [][]byte

func (*RpbListKeysResp) ProtoMessage

func (*RpbListKeysResp) ProtoMessage()

func (*RpbListKeysResp) Reset

func (m *RpbListKeysResp) Reset()

func (*RpbListKeysResp) String

func (m *RpbListKeysResp) String() string

type RpbMapRedReq

type RpbMapRedReq struct {
	Request          []byte `protobuf:"bytes,1,req,name=request" json:"request,omitempty"`
	ContentType      []byte `protobuf:"bytes,2,req,name=content_type" json:"content_type,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbMapRedReq) GetContentType

func (m *RpbMapRedReq) GetContentType() []byte

func (*RpbMapRedReq) GetRequest

func (m *RpbMapRedReq) GetRequest() []byte

func (*RpbMapRedReq) ProtoMessage

func (*RpbMapRedReq) ProtoMessage()

func (*RpbMapRedReq) Reset

func (m *RpbMapRedReq) Reset()

func (*RpbMapRedReq) String

func (m *RpbMapRedReq) String() string

type RpbMapRedResp

type RpbMapRedResp struct {
	Phase            *uint32 `protobuf:"varint,1,opt,name=phase" json:"phase,omitempty"`
	Response         []byte  `protobuf:"bytes,2,opt,name=response" json:"response,omitempty"`
	Done             *bool   `protobuf:"varint,3,opt,name=done" json:"done,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RpbMapRedResp) GetDone

func (m *RpbMapRedResp) GetDone() bool

func (*RpbMapRedResp) GetPhase

func (m *RpbMapRedResp) GetPhase() uint32

func (*RpbMapRedResp) GetResponse

func (m *RpbMapRedResp) GetResponse() []byte

func (*RpbMapRedResp) ProtoMessage

func (*RpbMapRedResp) ProtoMessage()

func (*RpbMapRedResp) Reset

func (m *RpbMapRedResp) Reset()

func (*RpbMapRedResp) String

func (m *RpbMapRedResp) String() string

type RpbModFun

type RpbModFun struct {
	Module           []byte `protobuf:"bytes,1,req,name=module" json:"module,omitempty"`
	Function         []byte `protobuf:"bytes,2,req,name=function" json:"function,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbModFun) GetFunction

func (m *RpbModFun) GetFunction() []byte

func (*RpbModFun) GetModule

func (m *RpbModFun) GetModule() []byte

func (*RpbModFun) ProtoMessage

func (*RpbModFun) ProtoMessage()

func (*RpbModFun) Reset

func (m *RpbModFun) Reset()

func (*RpbModFun) String

func (m *RpbModFun) String() string

type RpbPair

type RpbPair struct {
	Key              []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value            []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbPair) GetKey

func (m *RpbPair) GetKey() []byte

func (*RpbPair) GetValue

func (m *RpbPair) GetValue() []byte

func (*RpbPair) ProtoMessage

func (*RpbPair) ProtoMessage()

func (*RpbPair) Reset

func (m *RpbPair) Reset()

func (*RpbPair) String

func (m *RpbPair) String() string

type RpbPutReq

type RpbPutReq struct {
	Bucket           []byte      `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Key              []byte      `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Vclock           []byte      `protobuf:"bytes,3,opt,name=vclock" json:"vclock,omitempty"`
	Content          *RpbContent `protobuf:"bytes,4,req,name=content" json:"content,omitempty"`
	W                *uint32     `protobuf:"varint,5,opt,name=w" json:"w,omitempty"`
	Dw               *uint32     `protobuf:"varint,6,opt,name=dw" json:"dw,omitempty"`
	ReturnBody       *bool       `protobuf:"varint,7,opt,name=return_body" json:"return_body,omitempty"`
	Pw               *uint32     `protobuf:"varint,8,opt,name=pw" json:"pw,omitempty"`
	IfNotModified    *bool       `protobuf:"varint,9,opt,name=if_not_modified" json:"if_not_modified,omitempty"`
	IfNoneMatch      *bool       `protobuf:"varint,10,opt,name=if_none_match" json:"if_none_match,omitempty"`
	ReturnHead       *bool       `protobuf:"varint,11,opt,name=return_head" json:"return_head,omitempty"`
	Timeout          *uint32     `protobuf:"varint,12,opt,name=timeout" json:"timeout,omitempty"`
	Asis             *bool       `protobuf:"varint,13,opt,name=asis" json:"asis,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

func (*RpbPutReq) GetAsis

func (m *RpbPutReq) GetAsis() bool

func (*RpbPutReq) GetBucket

func (m *RpbPutReq) GetBucket() []byte

func (*RpbPutReq) GetContent

func (m *RpbPutReq) GetContent() *RpbContent

func (*RpbPutReq) GetDw

func (m *RpbPutReq) GetDw() uint32

func (*RpbPutReq) GetIfNoneMatch

func (m *RpbPutReq) GetIfNoneMatch() bool

func (*RpbPutReq) GetIfNotModified

func (m *RpbPutReq) GetIfNotModified() bool

func (*RpbPutReq) GetKey

func (m *RpbPutReq) GetKey() []byte

func (*RpbPutReq) GetPw

func (m *RpbPutReq) GetPw() uint32

func (*RpbPutReq) GetReturnBody

func (m *RpbPutReq) GetReturnBody() bool

func (*RpbPutReq) GetReturnHead

func (m *RpbPutReq) GetReturnHead() bool

func (*RpbPutReq) GetTimeout

func (m *RpbPutReq) GetTimeout() uint32

func (*RpbPutReq) GetVclock

func (m *RpbPutReq) GetVclock() []byte

func (*RpbPutReq) GetW

func (m *RpbPutReq) GetW() uint32

func (*RpbPutReq) ProtoMessage

func (*RpbPutReq) ProtoMessage()

func (*RpbPutReq) Reset

func (m *RpbPutReq) Reset()

func (*RpbPutReq) String

func (m *RpbPutReq) String() string

type RpbPutResp

type RpbPutResp struct {
	Content          []*RpbContent `protobuf:"bytes,1,rep,name=content" json:"content,omitempty"`
	Vclock           []byte        `protobuf:"bytes,2,opt,name=vclock" json:"vclock,omitempty"`
	Key              []byte        `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func (*RpbPutResp) GetContent

func (m *RpbPutResp) GetContent() []*RpbContent

func (*RpbPutResp) GetKey

func (m *RpbPutResp) GetKey() []byte

func (*RpbPutResp) GetVclock

func (m *RpbPutResp) GetVclock() []byte

func (*RpbPutResp) ProtoMessage

func (*RpbPutResp) ProtoMessage()

func (*RpbPutResp) Reset

func (m *RpbPutResp) Reset()

func (*RpbPutResp) String

func (m *RpbPutResp) String() string

type RpbResetBucketReq

type RpbResetBucketReq struct {
	Bucket           []byte `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbResetBucketReq) GetBucket

func (m *RpbResetBucketReq) GetBucket() []byte

func (*RpbResetBucketReq) ProtoMessage

func (*RpbResetBucketReq) ProtoMessage()

func (*RpbResetBucketReq) Reset

func (m *RpbResetBucketReq) Reset()

func (*RpbResetBucketReq) String

func (m *RpbResetBucketReq) String() string

type RpbSearchDoc

type RpbSearchDoc struct {
	Fields           []*RpbPair `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

func (*RpbSearchDoc) GetFields

func (m *RpbSearchDoc) GetFields() []*RpbPair

func (*RpbSearchDoc) ProtoMessage

func (*RpbSearchDoc) ProtoMessage()

func (*RpbSearchDoc) Reset

func (m *RpbSearchDoc) Reset()

func (*RpbSearchDoc) String

func (m *RpbSearchDoc) String() string

type RpbSearchQueryReq

type RpbSearchQueryReq struct {
	Q                []byte   `protobuf:"bytes,1,req,name=q" json:"q,omitempty"`
	Index            []byte   `protobuf:"bytes,2,req,name=index" json:"index,omitempty"`
	Rows             *uint32  `protobuf:"varint,3,opt,name=rows" json:"rows,omitempty"`
	Start            *uint32  `protobuf:"varint,4,opt,name=start" json:"start,omitempty"`
	Sort             []byte   `protobuf:"bytes,5,opt,name=sort" json:"sort,omitempty"`
	Filter           []byte   `protobuf:"bytes,6,opt,name=filter" json:"filter,omitempty"`
	Df               []byte   `protobuf:"bytes,7,opt,name=df" json:"df,omitempty"`
	Op               []byte   `protobuf:"bytes,8,opt,name=op" json:"op,omitempty"`
	Fl               [][]byte `protobuf:"bytes,9,rep,name=fl" json:"fl,omitempty"`
	Presort          []byte   `protobuf:"bytes,10,opt,name=presort" json:"presort,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*RpbSearchQueryReq) GetDf

func (m *RpbSearchQueryReq) GetDf() []byte

func (*RpbSearchQueryReq) GetFilter

func (m *RpbSearchQueryReq) GetFilter() []byte

func (*RpbSearchQueryReq) GetFl

func (m *RpbSearchQueryReq) GetFl() [][]byte

func (*RpbSearchQueryReq) GetIndex

func (m *RpbSearchQueryReq) GetIndex() []byte

func (*RpbSearchQueryReq) GetOp

func (m *RpbSearchQueryReq) GetOp() []byte

func (*RpbSearchQueryReq) GetPresort

func (m *RpbSearchQueryReq) GetPresort() []byte

func (*RpbSearchQueryReq) GetQ

func (m *RpbSearchQueryReq) GetQ() []byte

func (*RpbSearchQueryReq) GetRows

func (m *RpbSearchQueryReq) GetRows() uint32

func (*RpbSearchQueryReq) GetSort

func (m *RpbSearchQueryReq) GetSort() []byte

func (*RpbSearchQueryReq) GetStart

func (m *RpbSearchQueryReq) GetStart() uint32

func (*RpbSearchQueryReq) ProtoMessage

func (*RpbSearchQueryReq) ProtoMessage()

func (*RpbSearchQueryReq) Reset

func (m *RpbSearchQueryReq) Reset()

func (*RpbSearchQueryReq) String

func (m *RpbSearchQueryReq) String() string

type RpbSearchQueryResp

type RpbSearchQueryResp struct {
	Docs             []*RpbSearchDoc `protobuf:"bytes,1,rep,name=docs" json:"docs,omitempty"`
	MaxScore         *float32        `protobuf:"fixed32,2,opt,name=max_score" json:"max_score,omitempty"`
	NumFound         *uint32         `protobuf:"varint,3,opt,name=num_found" json:"num_found,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

func (*RpbSearchQueryResp) GetDocs

func (m *RpbSearchQueryResp) GetDocs() []*RpbSearchDoc

func (*RpbSearchQueryResp) GetMaxScore

func (m *RpbSearchQueryResp) GetMaxScore() float32

func (*RpbSearchQueryResp) GetNumFound

func (m *RpbSearchQueryResp) GetNumFound() uint32

func (*RpbSearchQueryResp) ProtoMessage

func (*RpbSearchQueryResp) ProtoMessage()

func (*RpbSearchQueryResp) Reset

func (m *RpbSearchQueryResp) Reset()

func (*RpbSearchQueryResp) String

func (m *RpbSearchQueryResp) String() string

type RpbSetBucketReq

type RpbSetBucketReq struct {
	Bucket           []byte          `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Props            *RpbBucketProps `protobuf:"bytes,2,req,name=props" json:"props,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

func (*RpbSetBucketReq) GetBucket

func (m *RpbSetBucketReq) GetBucket() []byte

func (*RpbSetBucketReq) GetProps

func (m *RpbSetBucketReq) GetProps() *RpbBucketProps

func (*RpbSetBucketReq) ProtoMessage

func (*RpbSetBucketReq) ProtoMessage()

func (*RpbSetBucketReq) Reset

func (m *RpbSetBucketReq) Reset()

func (*RpbSetBucketReq) String

func (m *RpbSetBucketReq) String() string

type RpbSetClientIdReq

type RpbSetClientIdReq struct {
	ClientId         []byte `protobuf:"bytes,1,req,name=client_id" json:"client_id,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RpbSetClientIdReq) GetClientId

func (m *RpbSetClientIdReq) GetClientId() []byte

func (*RpbSetClientIdReq) ProtoMessage

func (*RpbSetClientIdReq) ProtoMessage()

func (*RpbSetClientIdReq) Reset

func (m *RpbSetClientIdReq) Reset()

func (*RpbSetClientIdReq) String

func (m *RpbSetClientIdReq) String() string

type UnmarshalMethod

type UnmarshalMethod func([]byte, interface{}) error

UnmarshalMethod is the method signature of a unmarshaller.

Directories

Path Synopsis
test
integration command

Jump to

Keyboard shortcuts

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