cockroach: github.com/abhinavdahiya/cockroach/roachpb Index | Files

package roachpb

import "github.com/abhinavdahiya/cockroach/roachpb"

Package roachpb is a generated protocol buffer package.

It is generated from these files:

cockroach/roachpb/api.proto
cockroach/roachpb/data.proto
cockroach/roachpb/errors.proto
cockroach/roachpb/internal.proto
cockroach/roachpb/internal_raft.proto
cockroach/roachpb/metadata.proto

It has these top-level messages:

ResponseHeader
GetRequest
GetResponse
PutRequest
PutResponse
ConditionalPutRequest
ConditionalPutResponse
InitPutRequest
InitPutResponse
IncrementRequest
IncrementResponse
DeleteRequest
DeleteResponse
DeleteRangeRequest
DeleteRangeResponse
ScanRequest
ScanResponse
ReverseScanRequest
ReverseScanResponse
CheckConsistencyRequest
CheckConsistencyResponse
ChangeFrozenRequest
ChangeFrozenResponse
BeginTransactionRequest
BeginTransactionResponse
EndTransactionRequest
EndTransactionResponse
AdminSplitRequest
AdminSplitResponse
AdminMergeRequest
AdminMergeResponse
RangeLookupRequest
RangeLookupResponse
HeartbeatTxnRequest
HeartbeatTxnResponse
GCRequest
GCResponse
PushTxnRequest
PushTxnResponse
ResolveIntentRequest
ResolveIntentResponse
ResolveIntentRangeRequest
NoopResponse
NoopRequest
ResolveIntentRangeResponse
MergeRequest
MergeResponse
TruncateLogRequest
TruncateLogResponse
RequestLeaseRequest
TransferLeaseRequest
RequestLeaseResponse
ComputeChecksumRequest
ComputeChecksumResponse
VerifyChecksumRequest
VerifyChecksumResponse
RequestUnion
ResponseUnion
Header
BatchRequest
BatchResponse
RaftCommand
StoreRequestHeader
PollFrozenRequest
PollFrozenResponse
ReservationRequest
ReservationResponse
Span
Value
KeyValue
StoreIdent
SplitTrigger
MergeTrigger
ChangeReplicasTrigger
ModifiedSpanTrigger
InternalCommitTrigger
Transaction
Intent
Lease
AbortCacheEntry
NotLeaseHolderError
NodeUnavailableError
RangeNotFoundError
RangeKeyMismatchError
RangeFrozenError
ReadWithinUncertaintyIntervalError
TransactionAbortedError
TransactionPushError
TransactionRetryError
TransactionReplayError
TransactionStatusError
WriteIntentError
WriteTooOldError
OpRequiresTxnError
ConditionFailedError
LeaseRejectedError
SendError
RaftGroupDeletedError
ReplicaCorruptionError
ErrorDetail
ErrPosition
Error
InternalTimeSeriesData
InternalTimeSeriesSample
RaftTruncatedState
RaftTombstone
RaftSnapshotData
Attributes
ReplicaDescriptor
RangeDescriptor
StoreCapacity
NodeDescriptor
StoreDescriptor

Index

Package Files

api.go api.pb.go batch.go data.go data.pb.go errors.go errors.pb.go internal.go internal.pb.go internal_raft.pb.go merge_spans.go metadata.go metadata.pb.go method.go method_string.go

Constants

const (
    // MinUserPriority is the minimum allowed user priority.
    MinUserPriority = 0.001
    // LowUserPriority is the minimum user priority settable with SQL.
    LowUserPriority = 0.1
    // UnspecifiedUserPriority means NormalUserPriority.
    UnspecifiedUserPriority = 0
    // NormalUserPriority is set to 1, meaning ops run through the database
    // are all given equal weight when a random priority is chosen. This can
    // be set specifically via client.NewDBWithPriority().
    NormalUserPriority = 1
    // HighUserPriority is the maximum user priority settable with SQL.
    HighUserPriority = 10
    // MaxUserPriority is the maximum allowed user priority.
    MaxUserPriority = 1000
)

Variables

var (
    ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
var (
    // RKeyMin is a minimum key value which sorts before all other keys.
    RKeyMin = RKey("")
    // KeyMin is a minimum key value which sorts before all other keys.
    KeyMin = Key(RKeyMin)
    // RKeyMax is a maximum key value which sorts after all other keys.
    RKeyMax = RKey{0xff, 0xff}
    // KeyMax is a maximum key value which sorts after all other keys.
    KeyMax = Key(RKeyMax)

    // PrettyPrintKey is a function to print key with human readable format
    // it's implement at package git.com/cockroachdb/cockroach/keys to avoid package circle import
    PrettyPrintKey func(key Key) string
)
var (
    ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowData   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowErrors   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowInternal   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthInternalRaft = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowInternalRaft   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
)
var PushTxnType_name = map[int32]string{
    0:  "PUSH_TIMESTAMP",
    1:  "PUSH_ABORT",
    2:  "PUSH_TOUCH",
    3:  "PUSH_QUERY",
}
var PushTxnType_value = map[string]int32{
    "PUSH_TIMESTAMP": 0,
    "PUSH_ABORT":     1,
    "PUSH_TOUCH":     2,
    "PUSH_QUERY":     3,
}
var ReadConsistencyType_name = map[int32]string{
    0:  "CONSISTENT",
    1:  "CONSENSUS",
    2:  "INCONSISTENT",
}
var ReadConsistencyType_value = map[string]int32{
    "CONSISTENT":   0,
    "CONSENSUS":    1,
    "INCONSISTENT": 2,
}
var ReplicaChangeType_name = map[int32]string{
    0:  "ADD_REPLICA",
    1:  "REMOVE_REPLICA",
}
var ReplicaChangeType_value = map[string]int32{
    "ADD_REPLICA":    0,
    "REMOVE_REPLICA": 1,
}
var TransactionRestart_name = map[int32]string{
    0:  "NONE",
    1:  "BACKOFF",
    2:  "IMMEDIATE",
}
var TransactionRestart_value = map[string]int32{
    "NONE":      0,
    "BACKOFF":   1,
    "IMMEDIATE": 2,
}
var TransactionStatus_name = map[int32]string{
    0:  "PENDING",
    1:  "COMMITTED",
    2:  "ABORTED",
}
var TransactionStatus_value = map[string]int32{
    "PENDING":   0,
    "COMMITTED": 1,
    "ABORTED":   2,
}
var ValueType_name = map[int32]string{
    0:   "UNKNOWN",
    7:   "NULL",
    1:   "INT",
    2:   "FLOAT",
    3:   "BYTES",
    8:   "DELIMITED_BYTES",
    4:   "TIME",
    5:   "DECIMAL",
    9:   "DELIMITED_DECIMAL",
    6:   "DURATION",
    10:  "TUPLE",
    100: "TIMESERIES",
}
var ValueType_value = map[string]int32{
    "UNKNOWN":           0,
    "NULL":              7,
    "INT":               1,
    "FLOAT":             2,
    "BYTES":             3,
    "DELIMITED_BYTES":   8,
    "TIME":              4,
    "DECIMAL":           5,
    "DELIMITED_DECIMAL": 9,
    "DURATION":          6,
    "TUPLE":             10,
    "TIMESERIES":        100,
}

func AsIntents Uses

func AsIntents(spans []Span, txn *Transaction) []Intent

AsIntents takes a slice of spans and returns it as a slice of intents for the given transaction.

func BytesNext Uses

func BytesNext(b []byte) []byte

BytesNext returns the next possible byte slice, using the extra capacity of the provided slice if possible, and if not, appending an \x00.

func ErrorUnexpectedlySet Uses

func ErrorUnexpectedlySet(culprit, response interface{}) string

ErrorUnexpectedlySet creates a string to panic with when a response (typically a roachpb.BatchResponse) unexpectedly has Error set in its response header.

func IsRange Uses

func IsRange(args Request) bool

IsRange returns true if the operation is range-based and must include a start and an end key.

func IsReadOnly Uses

func IsReadOnly(args Request) bool

IsReadOnly returns true iff the request is read-only.

func IsTransactionWrite Uses

func IsTransactionWrite(args Request) bool

IsTransactionWrite returns true if the request produces write intents when used within a transaction.

func MakePriority Uses

func MakePriority(userPriority UserPriority) int32

MakePriority generates a random priority value, biased by the specified userPriority. If userPriority=100, the random priority will be 100x more likely to be greater than if userPriority=1. If userPriority = 0.1, the random priority will be 1/10th as likely to be greater than if userPriority=1. Balance is achieved when userPriority=1, in which case the priority chosen is unbiased.

func MergeSpans Uses

func MergeSpans(spans *[]Span) bool

MergeSpans sorts the incoming spans and merges overlapping spans. Returns true iff all of the spans are distinct.

func RegisterExternalServer Uses

func RegisterExternalServer(s *grpc.Server, srv ExternalServer)

func RegisterInternalServer Uses

func RegisterInternalServer(s *grpc.Server, srv InternalServer)

func TxnIDEqual Uses

func TxnIDEqual(a, b *uuid.UUID) bool

TxnIDEqual returns whether the transaction IDs are equal.

type AbortCacheEntry Uses

type AbortCacheEntry struct {
    // The key of the associated transaction.
    Key Key `protobuf:"bytes,1,opt,name=key,casttype=Key" json:"key,omitempty"`
    // The candidate commit timestamp the transaction record held at the time
    // it was aborted.
    Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp"`
    // The priority of the transaction.
    Priority int32 `protobuf:"varint,3,opt,name=priority" json:"priority"`
}

AbortCacheEntry contains information about a transaction which has been aborted. It's written to a range's abort cache if the range may have contained intents of the aborted txn. In the event that the same transaction attempts to read keys it may have written previously, this entry informs the transaction that it has aborted and must start fresh with an updated priority.

func NewPopulatedAbortCacheEntry Uses

func NewPopulatedAbortCacheEntry(r randyData, easy bool) *AbortCacheEntry

func (*AbortCacheEntry) Descriptor Uses

func (*AbortCacheEntry) Descriptor() ([]byte, []int)

func (*AbortCacheEntry) Marshal Uses

func (m *AbortCacheEntry) Marshal() (data []byte, err error)

func (*AbortCacheEntry) MarshalTo Uses

func (m *AbortCacheEntry) MarshalTo(data []byte) (int, error)

func (*AbortCacheEntry) ProtoMessage Uses

func (*AbortCacheEntry) ProtoMessage()

func (*AbortCacheEntry) Reset Uses

func (m *AbortCacheEntry) Reset()

func (*AbortCacheEntry) Size Uses

func (m *AbortCacheEntry) Size() (n int)

func (*AbortCacheEntry) String Uses

func (m *AbortCacheEntry) String() string

func (*AbortCacheEntry) Unmarshal Uses

func (m *AbortCacheEntry) Unmarshal(data []byte) error

type AdminMergeRequest Uses

type AdminMergeRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

An AdminMergeRequest is the argument to the AdminMerge() method. A merge is performed by calling AdminMerge on the left-hand range of two consecutive ranges (i.e. the range which contains keys which sort first). This range will be the subsuming range and the right hand range will be subsumed. After the merge operation, the subsumed range will no longer exist and the subsuming range will now encompass all keys from its original start key to the end key of the subsumed range. If AdminMerge is called on the final range in the key space, it is a noop.

func (*AdminMergeRequest) Descriptor Uses

func (*AdminMergeRequest) Descriptor() ([]byte, []int)

func (*AdminMergeRequest) Marshal Uses

func (m *AdminMergeRequest) Marshal() (data []byte, err error)

func (*AdminMergeRequest) MarshalTo Uses

func (m *AdminMergeRequest) MarshalTo(data []byte) (int, error)

func (*AdminMergeRequest) Method Uses

func (*AdminMergeRequest) Method() Method

Method implements the Request interface.

func (*AdminMergeRequest) ProtoMessage Uses

func (*AdminMergeRequest) ProtoMessage()

func (*AdminMergeRequest) Reset Uses

func (m *AdminMergeRequest) Reset()

func (*AdminMergeRequest) ShallowCopy Uses

func (amr *AdminMergeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminMergeRequest) Size Uses

func (m *AdminMergeRequest) Size() (n int)

func (*AdminMergeRequest) String Uses

func (m *AdminMergeRequest) String() string

func (*AdminMergeRequest) Unmarshal Uses

func (m *AdminMergeRequest) Unmarshal(data []byte) error

type AdminMergeResponse Uses

type AdminMergeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

An AdminMergeResponse is the return value from the AdminMerge() method.

func (*AdminMergeResponse) Descriptor Uses

func (*AdminMergeResponse) Descriptor() ([]byte, []int)

func (*AdminMergeResponse) Marshal Uses

func (m *AdminMergeResponse) Marshal() (data []byte, err error)

func (*AdminMergeResponse) MarshalTo Uses

func (m *AdminMergeResponse) MarshalTo(data []byte) (int, error)

func (*AdminMergeResponse) ProtoMessage Uses

func (*AdminMergeResponse) ProtoMessage()

func (*AdminMergeResponse) Reset Uses

func (m *AdminMergeResponse) Reset()

func (*AdminMergeResponse) Size Uses

func (m *AdminMergeResponse) Size() (n int)

func (*AdminMergeResponse) String Uses

func (m *AdminMergeResponse) String() string

func (*AdminMergeResponse) Unmarshal Uses

func (m *AdminMergeResponse) Unmarshal(data []byte) error

type AdminSplitRequest Uses

type AdminSplitRequest struct {
    Span     `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    SplitKey Key `protobuf:"bytes,2,opt,name=split_key,json=splitKey,casttype=Key" json:"split_key,omitempty"`
}

An AdminSplitRequest is the argument to the AdminSplit() method. The existing range which contains header.key is split by split_key. If split_key is not specified, then this method will determine a split key that is roughly halfway through the range. The existing range is resized to cover only its start key to the split key. The new range created by the split starts at the split key and extends to the original range's end key. If split_key is known, header.key should also be set to split_key.

New range IDs for each of the split range's replica and a new Raft ID are generated by the operation. Split requests are done in the context of a distributed transaction which updates range addressing records, range metadata and finally, provides a commit trigger to update bookkeeping and instantiate the new range on commit.

The new range contains range replicas located on the same stores; no range data is moved during this operation. The split can be thought of as a mostly logical operation, though some other metadata (e.g. sequence cache and range stats must be copied or recomputed).

func (*AdminSplitRequest) Descriptor Uses

func (*AdminSplitRequest) Descriptor() ([]byte, []int)

func (*AdminSplitRequest) Marshal Uses

func (m *AdminSplitRequest) Marshal() (data []byte, err error)

func (*AdminSplitRequest) MarshalTo Uses

func (m *AdminSplitRequest) MarshalTo(data []byte) (int, error)

func (*AdminSplitRequest) Method Uses

func (*AdminSplitRequest) Method() Method

Method implements the Request interface.

func (*AdminSplitRequest) ProtoMessage Uses

func (*AdminSplitRequest) ProtoMessage()

func (*AdminSplitRequest) Reset Uses

func (m *AdminSplitRequest) Reset()

func (*AdminSplitRequest) ShallowCopy Uses

func (asr *AdminSplitRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminSplitRequest) Size Uses

func (m *AdminSplitRequest) Size() (n int)

func (*AdminSplitRequest) String Uses

func (m *AdminSplitRequest) String() string

func (*AdminSplitRequest) Unmarshal Uses

func (m *AdminSplitRequest) Unmarshal(data []byte) error

type AdminSplitResponse Uses

type AdminSplitResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

An AdminSplitResponse is the return value from the AdminSplit() method.

func (*AdminSplitResponse) Descriptor Uses

func (*AdminSplitResponse) Descriptor() ([]byte, []int)

func (*AdminSplitResponse) Marshal Uses

func (m *AdminSplitResponse) Marshal() (data []byte, err error)

func (*AdminSplitResponse) MarshalTo Uses

func (m *AdminSplitResponse) MarshalTo(data []byte) (int, error)

func (*AdminSplitResponse) ProtoMessage Uses

func (*AdminSplitResponse) ProtoMessage()

func (*AdminSplitResponse) Reset Uses

func (m *AdminSplitResponse) Reset()

func (*AdminSplitResponse) Size Uses

func (m *AdminSplitResponse) Size() (n int)

func (*AdminSplitResponse) String Uses

func (m *AdminSplitResponse) String() string

func (*AdminSplitResponse) Unmarshal Uses

func (m *AdminSplitResponse) Unmarshal(data []byte) error

type Attributes Uses

type Attributes struct {
    Attrs []string `protobuf:"bytes,1,rep,name=attrs" json:"attrs,omitempty" yaml:"attrs,flow"`
}

Attributes specifies a list of arbitrary strings describing node topology, store type, and machine capabilities.

func (*Attributes) Descriptor Uses

func (*Attributes) Descriptor() ([]byte, []int)

func (Attributes) IsSubset Uses

func (a Attributes) IsSubset(b Attributes) bool

IsSubset returns whether attributes list a is a subset of attributes list b.

func (*Attributes) Marshal Uses

func (m *Attributes) Marshal() (data []byte, err error)

func (*Attributes) MarshalTo Uses

func (m *Attributes) MarshalTo(data []byte) (int, error)

func (*Attributes) ProtoMessage Uses

func (*Attributes) ProtoMessage()

func (*Attributes) Reset Uses

func (m *Attributes) Reset()

func (*Attributes) Size Uses

func (m *Attributes) Size() (n int)

func (Attributes) SortedString Uses

func (a Attributes) SortedString() string

SortedString returns a sorted, de-duplicated, comma-separated list of the attributes.

func (Attributes) String Uses

func (a Attributes) String() string

func (*Attributes) Unmarshal Uses

func (m *Attributes) Unmarshal(data []byte) error

type BatchRequest Uses

type BatchRequest struct {
    Header   `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Requests []RequestUnion `protobuf:"bytes,2,rep,name=requests" json:"requests"`
}

A BatchRequest contains one or more requests to be executed in parallel, or if applicable (based on write-only commands and range-locality), as a single update.

func (*BatchRequest) Add Uses

func (ba *BatchRequest) Add(requests ...Request)

Add adds a request to the batch request. It's a convenience method; requests may also be added directly into the slice.

func (*BatchRequest) CreateReply Uses

func (ba *BatchRequest) CreateReply() *BatchResponse

CreateReply creates replies for each of the contained requests, wrapped in a BatchResponse. The response objects are batch allocated to minimize allocation overhead which adds a bit of complexity to this function.

func (*BatchRequest) Descriptor Uses

func (*BatchRequest) Descriptor() ([]byte, []int)

func (*BatchRequest) GetArg Uses

func (ba *BatchRequest) GetArg(method Method) (Request, bool)

GetArg returns a request of the given type if one is contained in the Batch. The request returned is the first of its kind, with the exception of EndTransaction, where it examines the very last request only.

func (*BatchRequest) GetUser Uses

func (*BatchRequest) GetUser() string

GetUser implements security.RequestWithUser. KV messages are always sent by the node user.

func (*BatchRequest) IntentSpanIterate Uses

func (ba *BatchRequest) IntentSpanIterate(fn func(key, endKey Key))

IntentSpanIterate calls the passed method with the key ranges of the transactional writes contained in the batch.

func (*BatchRequest) IsAdmin Uses

func (ba *BatchRequest) IsAdmin() bool

IsAdmin returns true iff the BatchRequest contains an admin request.

func (*BatchRequest) IsFreeze Uses

func (ba *BatchRequest) IsFreeze() bool

IsFreeze returns whether the batch consists of a single ChangeFrozen request.

func (*BatchRequest) IsLease Uses

func (ba *BatchRequest) IsLease() bool

IsLease returns whether the batch consists of a single RequestLease request.

func (*BatchRequest) IsPossibleTransaction Uses

func (ba *BatchRequest) IsPossibleTransaction() bool

IsPossibleTransaction returns true iff the BatchRequest contains requests that can be part of a transaction.

func (*BatchRequest) IsReadOnly Uses

func (ba *BatchRequest) IsReadOnly() bool

IsReadOnly returns true if all requests within are read-only.

func (*BatchRequest) IsReverse Uses

func (ba *BatchRequest) IsReverse() bool

IsReverse returns true iff the BatchRequest contains a reverse request.

func (*BatchRequest) IsTransactionWrite Uses

func (ba *BatchRequest) IsTransactionWrite() bool

IsTransactionWrite returns true iff the BatchRequest contains a txn write.

func (*BatchRequest) IsWrite Uses

func (ba *BatchRequest) IsWrite() bool

IsWrite returns true iff the BatchRequest contains a write.

func (*BatchRequest) Marshal Uses

func (m *BatchRequest) Marshal() (data []byte, err error)

func (*BatchRequest) MarshalTo Uses

func (m *BatchRequest) MarshalTo(data []byte) (int, error)

func (*BatchRequest) Methods Uses

func (ba *BatchRequest) Methods() []Method

Methods returns a slice of the contained methods.

func (*BatchRequest) ProtoMessage Uses

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) Reset Uses

func (m *BatchRequest) Reset()

func (*BatchRequest) SetActiveTimestamp Uses

func (ba *BatchRequest) SetActiveTimestamp(nowFn func() hlc.Timestamp) error

SetActiveTimestamp sets the correct timestamp at which the request is to be carried out. For transactional requests, ba.Timestamp must be zero initially and it will be set to txn.OrigTimestamp. For non-transactional requests, if no timestamp is specified, nowFn is used to create and set one.

func (*BatchRequest) SetNewRequest Uses

func (ba *BatchRequest) SetNewRequest()

SetNewRequest increases the internal sequence counter of this batch request. The sequence counter is used for replay and reordering protection. At the Store, a sequence counter less than or equal to the last observed one incurs a transaction restart (if the request is transactional).

func (*BatchRequest) Size Uses

func (m *BatchRequest) Size() (n int)

func (BatchRequest) Split Uses

func (ba BatchRequest) Split(canSplitET bool) [][]RequestUnion

Split separates the requests contained in a batch so that each subset of requests can be executed by a Store (without changing order). In particular, Admin requests are always singled out and mutating requests separated from reads. The boolean parameter indicates whether EndTransaction should be special-cased: If false, an EndTransaction request will never be split into a new chunk (otherwise, it is treated according to its flags). This allows sending a whole transaction in a single Batch when addressing a single range.

func (BatchRequest) String Uses

func (ba BatchRequest) String() string

String gives a brief summary of the contained requests and keys in the batch. TODO(tschottdorf): the key range is useful information, but requires `keys`. See #2198.

func (*BatchRequest) Unmarshal Uses

func (m *BatchRequest) Unmarshal(data []byte) error

type BatchResponse Uses

type BatchResponse struct {
    BatchResponse_Header `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Responses            []ResponseUnion `protobuf:"bytes,2,rep,name=responses" json:"responses"`
}

A BatchResponse contains one or more responses, one per request corresponding to the requests in the matching BatchRequest. The error in the response header is set to the first error from the slice of responses, if applicable.

func (*BatchResponse) Add Uses

func (br *BatchResponse) Add(reply Response)

Add adds a response to the batch response. It's a convenience method; responses may also be added directly.

func (*BatchResponse) Combine Uses

func (br *BatchResponse) Combine(otherBatch *BatchResponse) error

Combine implements the Combinable interface. It combines each slot of the given request into the corresponding slot of the base response. The number of slots must be equal and the respective slots must be combinable. On error, the receiver BatchResponse is in an invalid state. TODO(tschottdorf): write tests.

func (*BatchResponse) Descriptor Uses

func (*BatchResponse) Descriptor() ([]byte, []int)

func (*BatchResponse) Marshal Uses

func (m *BatchResponse) Marshal() (data []byte, err error)

func (*BatchResponse) MarshalTo Uses

func (m *BatchResponse) MarshalTo(data []byte) (int, error)

func (*BatchResponse) ProtoMessage Uses

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) Reset Uses

func (m *BatchResponse) Reset()

func (*BatchResponse) Size Uses

func (m *BatchResponse) Size() (n int)

func (*BatchResponse) String Uses

func (br *BatchResponse) String() string

func (*BatchResponse) Unmarshal Uses

func (m *BatchResponse) Unmarshal(data []byte) error

type BatchResponse_Header Uses

type BatchResponse_Header struct {
    // error is non-nil if an error occurred.
    Error *Error `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
    // timestamp is set only for non-transactional responses and denotes the
    // highest timestamp at which a command from the batch executed. At the
    // time of writing, it is used solely for informational purposes and tests.
    Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=Timestamp,json=timestamp" json:"Timestamp"`
    // txn is non-nil if the request specified a non-nil
    // transaction. The transaction timestamp and/or priority may have
    // been updated, depending on the outcome of the request.
    Txn *Transaction `protobuf:"bytes,3,opt,name=txn" json:"txn,omitempty"`
    // collected_spans is a binary representation of the trace spans
    // generated during the execution of this request.
    CollectedSpans [][]byte `protobuf:"bytes,4,rep,name=collected_spans,json=collectedSpans" json:"collected_spans,omitempty"`
    // now is the current time at the node sending the response,
    // which can be used by the receiver to update its local HLC.
    Now cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=now" json:"now"`
}

func (*BatchResponse_Header) Descriptor Uses

func (*BatchResponse_Header) Descriptor() ([]byte, []int)

func (*BatchResponse_Header) Marshal Uses

func (m *BatchResponse_Header) Marshal() (data []byte, err error)

func (*BatchResponse_Header) MarshalTo Uses

func (m *BatchResponse_Header) MarshalTo(data []byte) (int, error)

func (*BatchResponse_Header) ProtoMessage Uses

func (*BatchResponse_Header) ProtoMessage()

func (*BatchResponse_Header) Reset Uses

func (m *BatchResponse_Header) Reset()

func (*BatchResponse_Header) Size Uses

func (m *BatchResponse_Header) Size() (n int)

func (*BatchResponse_Header) String Uses

func (m *BatchResponse_Header) String() string

func (*BatchResponse_Header) Unmarshal Uses

func (m *BatchResponse_Header) Unmarshal(data []byte) error

type BeginTransactionRequest Uses

type BeginTransactionRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A BeginTransactionRequest is the argument to the BeginTransaction() method.

func (*BeginTransactionRequest) Descriptor Uses

func (*BeginTransactionRequest) Descriptor() ([]byte, []int)

func (*BeginTransactionRequest) Marshal Uses

func (m *BeginTransactionRequest) Marshal() (data []byte, err error)

func (*BeginTransactionRequest) MarshalTo Uses

func (m *BeginTransactionRequest) MarshalTo(data []byte) (int, error)

func (*BeginTransactionRequest) Method Uses

func (*BeginTransactionRequest) Method() Method

Method implements the Request interface.

func (*BeginTransactionRequest) ProtoMessage Uses

func (*BeginTransactionRequest) ProtoMessage()

func (*BeginTransactionRequest) Reset Uses

func (m *BeginTransactionRequest) Reset()

func (*BeginTransactionRequest) ShallowCopy Uses

func (btr *BeginTransactionRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*BeginTransactionRequest) Size Uses

func (m *BeginTransactionRequest) Size() (n int)

func (*BeginTransactionRequest) String Uses

func (m *BeginTransactionRequest) String() string

func (*BeginTransactionRequest) Unmarshal Uses

func (m *BeginTransactionRequest) Unmarshal(data []byte) error

type BeginTransactionResponse Uses

type BeginTransactionResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A BeginTransactionResponse is the return value from the BeginTransaction() method.

func (*BeginTransactionResponse) Descriptor Uses

func (*BeginTransactionResponse) Descriptor() ([]byte, []int)

func (*BeginTransactionResponse) Marshal Uses

func (m *BeginTransactionResponse) Marshal() (data []byte, err error)

func (*BeginTransactionResponse) MarshalTo Uses

func (m *BeginTransactionResponse) MarshalTo(data []byte) (int, error)

func (*BeginTransactionResponse) ProtoMessage Uses

func (*BeginTransactionResponse) ProtoMessage()

func (*BeginTransactionResponse) Reset Uses

func (m *BeginTransactionResponse) Reset()

func (*BeginTransactionResponse) Size Uses

func (m *BeginTransactionResponse) Size() (n int)

func (*BeginTransactionResponse) String Uses

func (m *BeginTransactionResponse) String() string

func (*BeginTransactionResponse) Unmarshal Uses

func (m *BeginTransactionResponse) Unmarshal(data []byte) error

type Bounded Uses

type Bounded interface {
    GetBound() int64
    SetBound(bound int64)
}

Bounded is implemented by request types which have a bounded number of result rows, such as Scan.

type ChangeFrozenRequest Uses

type ChangeFrozenRequest struct {
    Span   `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Frozen bool `protobuf:"varint,2,opt,name=frozen" json:"frozen"`
    // When freezing, the version all Replicas be running. On mismatch, the Replica
    // must stall itself as it may already have diverged due to version skew.
    MustVersion string `protobuf:"bytes,3,opt,name=must_version,json=mustVersion" json:"must_version"`
}

ChangeFrozenRequest idempotently freezes or unfreezes all of the Ranges whose whose StartKey is contained in the specified range. For example with ranges [a,c), [c,g) and [g,z), a request for [b,e) would affect [c,g) only.

func (*ChangeFrozenRequest) Descriptor Uses

func (*ChangeFrozenRequest) Descriptor() ([]byte, []int)

func (*ChangeFrozenRequest) Marshal Uses

func (m *ChangeFrozenRequest) Marshal() (data []byte, err error)

func (*ChangeFrozenRequest) MarshalTo Uses

func (m *ChangeFrozenRequest) MarshalTo(data []byte) (int, error)

func (*ChangeFrozenRequest) Method Uses

func (*ChangeFrozenRequest) Method() Method

Method implements the Request interface.

func (*ChangeFrozenRequest) ProtoMessage Uses

func (*ChangeFrozenRequest) ProtoMessage()

func (*ChangeFrozenRequest) Reset Uses

func (m *ChangeFrozenRequest) Reset()

func (*ChangeFrozenRequest) ShallowCopy Uses

func (afr *ChangeFrozenRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ChangeFrozenRequest) Size Uses

func (m *ChangeFrozenRequest) Size() (n int)

func (*ChangeFrozenRequest) String Uses

func (m *ChangeFrozenRequest) String() string

func (*ChangeFrozenRequest) Unmarshal Uses

func (m *ChangeFrozenRequest) Unmarshal(data []byte) error

type ChangeFrozenResponse Uses

type ChangeFrozenResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // The number of Ranges whose state changed (i.e. from unfrozen to frozen or
    // vice versa) as a result of the operation.
    RangesAffected int64 `protobuf:"varint,2,opt,name=ranges_affected,json=rangesAffected" json:"ranges_affected"`
    // The StartKey of the first Range (i.e. the one sorting first) encountered
    // during execution (regardless of whether the command had any effect on that
    // specific Range).
    MinStartKey RKey `protobuf:"bytes,3,opt,name=min_start_key,json=minStartKey,casttype=RKey" json:"min_start_key,omitempty"`
    // The StoreIDs to which this request applies (i.e. all StoreIDs which had
    // a Replica on which the command should execute, even when already
    // frozen).
    Stores map[StoreID]NodeID `protobuf:"bytes,4,rep,name=stores,castkey=StoreID,castvalue=NodeID" json:"stores" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
}

ChangeFrozenResponse is the return value from the ChangeFrozen() method.

func (*ChangeFrozenResponse) Descriptor Uses

func (*ChangeFrozenResponse) Descriptor() ([]byte, []int)

func (*ChangeFrozenResponse) Marshal Uses

func (m *ChangeFrozenResponse) Marshal() (data []byte, err error)

func (*ChangeFrozenResponse) MarshalTo Uses

func (m *ChangeFrozenResponse) MarshalTo(data []byte) (int, error)

func (*ChangeFrozenResponse) ProtoMessage Uses

func (*ChangeFrozenResponse) ProtoMessage()

func (*ChangeFrozenResponse) Reset Uses

func (m *ChangeFrozenResponse) Reset()

func (*ChangeFrozenResponse) Size Uses

func (m *ChangeFrozenResponse) Size() (n int)

func (*ChangeFrozenResponse) String Uses

func (m *ChangeFrozenResponse) String() string

func (*ChangeFrozenResponse) Unmarshal Uses

func (m *ChangeFrozenResponse) Unmarshal(data []byte) error

type ChangeReplicasTrigger Uses

type ChangeReplicasTrigger struct {
    ChangeType ReplicaChangeType `protobuf:"varint,1,opt,name=change_type,json=changeType,enum=cockroach.roachpb.ReplicaChangeType" json:"change_type"`
    // The replica being modified.
    Replica ReplicaDescriptor `protobuf:"bytes,2,opt,name=replica" json:"replica"`
    // The new replica list with this change applied.
    UpdatedReplicas []ReplicaDescriptor `protobuf:"bytes,3,rep,name=updated_replicas,json=updatedReplicas" json:"updated_replicas"`
    NextReplicaID   ReplicaID           `protobuf:"varint,4,opt,name=next_replica_id,json=nextReplicaId,casttype=ReplicaID" json:"next_replica_id"`
}

func (*ChangeReplicasTrigger) Descriptor Uses

func (*ChangeReplicasTrigger) Descriptor() ([]byte, []int)

func (*ChangeReplicasTrigger) Marshal Uses

func (m *ChangeReplicasTrigger) Marshal() (data []byte, err error)

func (*ChangeReplicasTrigger) MarshalTo Uses

func (m *ChangeReplicasTrigger) MarshalTo(data []byte) (int, error)

func (*ChangeReplicasTrigger) ProtoMessage Uses

func (*ChangeReplicasTrigger) ProtoMessage()

func (*ChangeReplicasTrigger) Reset Uses

func (m *ChangeReplicasTrigger) Reset()

func (*ChangeReplicasTrigger) Size Uses

func (m *ChangeReplicasTrigger) Size() (n int)

func (*ChangeReplicasTrigger) String Uses

func (m *ChangeReplicasTrigger) String() string

func (*ChangeReplicasTrigger) Unmarshal Uses

func (m *ChangeReplicasTrigger) Unmarshal(data []byte) error

type CheckConsistencyRequest Uses

type CheckConsistencyRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // log a diff of inconsistencies if such inconsistencies are found.
    WithDiff bool `protobuf:"varint,2,opt,name=with_diff,json=withDiff" json:"with_diff"`
}

A CheckConsistencyRequest is the argument to the CheckConsistency() method. It specifies the start and end keys for a span of ranges to which a consistency check should be applied. A consistency check on a range involves running a ComputeChecksum on the range followed by a VerifyChecksum.

func (*CheckConsistencyRequest) Descriptor Uses

func (*CheckConsistencyRequest) Descriptor() ([]byte, []int)

func (*CheckConsistencyRequest) Marshal Uses

func (m *CheckConsistencyRequest) Marshal() (data []byte, err error)

func (*CheckConsistencyRequest) MarshalTo Uses

func (m *CheckConsistencyRequest) MarshalTo(data []byte) (int, error)

func (*CheckConsistencyRequest) Method Uses

func (*CheckConsistencyRequest) Method() Method

Method implements the Request interface.

func (*CheckConsistencyRequest) ProtoMessage Uses

func (*CheckConsistencyRequest) ProtoMessage()

func (*CheckConsistencyRequest) Reset Uses

func (m *CheckConsistencyRequest) Reset()

func (*CheckConsistencyRequest) ShallowCopy Uses

func (ccr *CheckConsistencyRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*CheckConsistencyRequest) Size Uses

func (m *CheckConsistencyRequest) Size() (n int)

func (*CheckConsistencyRequest) String Uses

func (m *CheckConsistencyRequest) String() string

func (*CheckConsistencyRequest) Unmarshal Uses

func (m *CheckConsistencyRequest) Unmarshal(data []byte) error

type CheckConsistencyResponse Uses

type CheckConsistencyResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A CheckConsistencyResponse is the return value from the CheckConsistency() method. If a replica finds itself to be inconsistent with its lease holder it will panic.

func (*CheckConsistencyResponse) Descriptor Uses

func (*CheckConsistencyResponse) Descriptor() ([]byte, []int)

func (*CheckConsistencyResponse) Marshal Uses

func (m *CheckConsistencyResponse) Marshal() (data []byte, err error)

func (*CheckConsistencyResponse) MarshalTo Uses

func (m *CheckConsistencyResponse) MarshalTo(data []byte) (int, error)

func (*CheckConsistencyResponse) ProtoMessage Uses

func (*CheckConsistencyResponse) ProtoMessage()

func (*CheckConsistencyResponse) Reset Uses

func (m *CheckConsistencyResponse) Reset()

func (*CheckConsistencyResponse) Size Uses

func (m *CheckConsistencyResponse) Size() (n int)

func (*CheckConsistencyResponse) String Uses

func (m *CheckConsistencyResponse) String() string

func (*CheckConsistencyResponse) Unmarshal Uses

func (m *CheckConsistencyResponse) Unmarshal(data []byte) error

type ComputeChecksumRequest Uses

type ComputeChecksumRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // The version used to pick the checksum method. It allows us to use a
    // consistent checksumming method across replicas.
    Version uint32 `protobuf:"varint,2,opt,name=version" json:"version"`
    // A unique identifier to match a future VerifyChecksumRequest with this request.
    ChecksumID github_com_cockroachdb_cockroach_util_uuid.UUID `protobuf:"bytes,3,opt,name=checksum_id,json=checksumId,customtype=github.com/cockroachdb/cockroach/util/uuid.UUID" json:"checksum_id"`
    // Compute a checksum along with a snapshot of the entire range, that will
    // be used in logging a diff during checksum verification.
    Snapshot bool `protobuf:"varint,4,opt,name=snapshot" json:"snapshot"`
}

A ComputeChecksumRequest is arguments to the ComputeChecksum() method, to start computing the checksum for the specified range at the snapshot for this request command. A response is returned without the checksum. The computed checksum is later compared to the one supplied through a VerifyChecksumRequest.

func (*ComputeChecksumRequest) Descriptor Uses

func (*ComputeChecksumRequest) Descriptor() ([]byte, []int)

func (*ComputeChecksumRequest) Marshal Uses

func (m *ComputeChecksumRequest) Marshal() (data []byte, err error)

func (*ComputeChecksumRequest) MarshalTo Uses

func (m *ComputeChecksumRequest) MarshalTo(data []byte) (int, error)

func (*ComputeChecksumRequest) Method Uses

func (*ComputeChecksumRequest) Method() Method

Method implements the Request interface.

func (*ComputeChecksumRequest) ProtoMessage Uses

func (*ComputeChecksumRequest) ProtoMessage()

func (*ComputeChecksumRequest) Reset Uses

func (m *ComputeChecksumRequest) Reset()

func (*ComputeChecksumRequest) ShallowCopy Uses

func (ccr *ComputeChecksumRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ComputeChecksumRequest) Size Uses

func (m *ComputeChecksumRequest) Size() (n int)

func (*ComputeChecksumRequest) String Uses

func (m *ComputeChecksumRequest) String() string

func (*ComputeChecksumRequest) Unmarshal Uses

func (m *ComputeChecksumRequest) Unmarshal(data []byte) error

type ComputeChecksumResponse Uses

type ComputeChecksumResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A ComputeChecksumResponse is the response to a ComputeChecksum() operation.

func (*ComputeChecksumResponse) Descriptor Uses

func (*ComputeChecksumResponse) Descriptor() ([]byte, []int)

func (*ComputeChecksumResponse) Marshal Uses

func (m *ComputeChecksumResponse) Marshal() (data []byte, err error)

func (*ComputeChecksumResponse) MarshalTo Uses

func (m *ComputeChecksumResponse) MarshalTo(data []byte) (int, error)

func (*ComputeChecksumResponse) ProtoMessage Uses

func (*ComputeChecksumResponse) ProtoMessage()

func (*ComputeChecksumResponse) Reset Uses

func (m *ComputeChecksumResponse) Reset()

func (*ComputeChecksumResponse) Size Uses

func (m *ComputeChecksumResponse) Size() (n int)

func (*ComputeChecksumResponse) String Uses

func (m *ComputeChecksumResponse) String() string

func (*ComputeChecksumResponse) Unmarshal Uses

func (m *ComputeChecksumResponse) Unmarshal(data []byte) error

type ConditionFailedError Uses

type ConditionFailedError struct {
    ActualValue *Value `protobuf:"bytes,1,opt,name=actual_value,json=actualValue" json:"actual_value,omitempty"`
}

A ConditionFailedError indicates that the expected value of a ConditionalPutRequest was not found, either because it was missing or was not equal. The error will contain the actual value found.

func (*ConditionFailedError) Descriptor Uses

func (*ConditionFailedError) Descriptor() ([]byte, []int)

func (*ConditionFailedError) Error Uses

func (e *ConditionFailedError) Error() string

func (*ConditionFailedError) Marshal Uses

func (m *ConditionFailedError) Marshal() (data []byte, err error)

func (*ConditionFailedError) MarshalTo Uses

func (m *ConditionFailedError) MarshalTo(data []byte) (int, error)

func (*ConditionFailedError) ProtoMessage Uses

func (*ConditionFailedError) ProtoMessage()

func (*ConditionFailedError) Reset Uses

func (m *ConditionFailedError) Reset()

func (*ConditionFailedError) Size Uses

func (m *ConditionFailedError) Size() (n int)

func (*ConditionFailedError) String Uses

func (m *ConditionFailedError) String() string

func (*ConditionFailedError) Unmarshal Uses

func (m *ConditionFailedError) Unmarshal(data []byte) error

type ConditionalPutRequest Uses

type ConditionalPutRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // The value to put.
    Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
    // Set exp_value.bytes empty to test for non-existence. Specify as nil
    // to indicate there should be no existing entry. This is different
    // from the expectation that the value exists but is empty.
    ExpValue *Value `protobuf:"bytes,3,opt,name=exp_value,json=expValue" json:"exp_value,omitempty"`
    // NOTE: For internal use only! Set to indicate that the put is
    // writing to virgin keyspace and no reads are necessary to
    // rationalize MVCC.
    Blind bool `protobuf:"varint,4,opt,name=blind" json:"blind"`
}

A ConditionalPutRequest is the argument to the ConditionalPut() method.

- Returns true and sets value if exp_value equals existing value. - If key doesn't exist and exp_value is nil, sets value. - If key exists, but value is empty and exp_value is not nil but empty, sets value. - Otherwise, returns error and the actual value of the key in the response.

func (*ConditionalPutRequest) Descriptor Uses

func (*ConditionalPutRequest) Descriptor() ([]byte, []int)

func (*ConditionalPutRequest) Marshal Uses

func (m *ConditionalPutRequest) Marshal() (data []byte, err error)

func (*ConditionalPutRequest) MarshalTo Uses

func (m *ConditionalPutRequest) MarshalTo(data []byte) (int, error)

func (*ConditionalPutRequest) Method Uses

func (*ConditionalPutRequest) Method() Method

Method implements the Request interface.

func (*ConditionalPutRequest) ProtoMessage Uses

func (*ConditionalPutRequest) ProtoMessage()

func (*ConditionalPutRequest) Reset Uses

func (m *ConditionalPutRequest) Reset()

func (*ConditionalPutRequest) ShallowCopy Uses

func (cpr *ConditionalPutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ConditionalPutRequest) Size Uses

func (m *ConditionalPutRequest) Size() (n int)

func (*ConditionalPutRequest) String Uses

func (m *ConditionalPutRequest) String() string

func (*ConditionalPutRequest) Unmarshal Uses

func (m *ConditionalPutRequest) Unmarshal(data []byte) error

type ConditionalPutResponse Uses

type ConditionalPutResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A ConditionalPutResponse is the return value from the ConditionalPut() method.

func (*ConditionalPutResponse) Descriptor Uses

func (*ConditionalPutResponse) Descriptor() ([]byte, []int)

func (*ConditionalPutResponse) Marshal Uses

func (m *ConditionalPutResponse) Marshal() (data []byte, err error)

func (*ConditionalPutResponse) MarshalTo Uses

func (m *ConditionalPutResponse) MarshalTo(data []byte) (int, error)

func (*ConditionalPutResponse) ProtoMessage Uses

func (*ConditionalPutResponse) ProtoMessage()

func (*ConditionalPutResponse) Reset Uses

func (m *ConditionalPutResponse) Reset()

func (*ConditionalPutResponse) Size Uses

func (m *ConditionalPutResponse) Size() (n int)

func (*ConditionalPutResponse) String Uses

func (m *ConditionalPutResponse) String() string

func (*ConditionalPutResponse) Unmarshal Uses

func (m *ConditionalPutResponse) Unmarshal(data []byte) error

type Countable Uses

type Countable interface {
    Count() int64
}

Countable is implemented by response types which have a number of result rows, such as Scan.

type DeleteRangeRequest Uses

type DeleteRangeRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // If 0, *all* entries between key (inclusive) and end_key
    // (exclusive) are deleted. Must be >= 0.
    MaxEntriesToDelete int64 `protobuf:"varint,2,opt,name=max_entries_to_delete,json=maxEntriesToDelete" json:"max_entries_to_delete"`
    ReturnKeys         bool  `protobuf:"varint,3,opt,name=return_keys,json=returnKeys" json:"return_keys"`
}

A DeleteRangeRequest is the argument to the DeleteRange() method. It specifies the range of keys to delete and a maximum number of key-value pairs to delete (zero for unlimited).

func (*DeleteRangeRequest) Descriptor Uses

func (*DeleteRangeRequest) Descriptor() ([]byte, []int)

func (*DeleteRangeRequest) Marshal Uses

func (m *DeleteRangeRequest) Marshal() (data []byte, err error)

func (*DeleteRangeRequest) MarshalTo Uses

func (m *DeleteRangeRequest) MarshalTo(data []byte) (int, error)

func (*DeleteRangeRequest) Method Uses

func (*DeleteRangeRequest) Method() Method

Method implements the Request interface.

func (*DeleteRangeRequest) ProtoMessage Uses

func (*DeleteRangeRequest) ProtoMessage()

func (*DeleteRangeRequest) Reset Uses

func (m *DeleteRangeRequest) Reset()

func (*DeleteRangeRequest) ShallowCopy Uses

func (drr *DeleteRangeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*DeleteRangeRequest) Size Uses

func (m *DeleteRangeRequest) Size() (n int)

func (*DeleteRangeRequest) String Uses

func (m *DeleteRangeRequest) String() string

func (*DeleteRangeRequest) Unmarshal Uses

func (m *DeleteRangeRequest) Unmarshal(data []byte) error

type DeleteRangeResponse Uses

type DeleteRangeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // Number of entries removed.
    Keys []Key `protobuf:"bytes,2,rep,name=keys,casttype=Key" json:"keys,omitempty"`
}

A DeleteRangeResponse is the return value from the DeleteRange() method.

func (*DeleteRangeResponse) Descriptor Uses

func (*DeleteRangeResponse) Descriptor() ([]byte, []int)

func (*DeleteRangeResponse) Marshal Uses

func (m *DeleteRangeResponse) Marshal() (data []byte, err error)

func (*DeleteRangeResponse) MarshalTo Uses

func (m *DeleteRangeResponse) MarshalTo(data []byte) (int, error)

func (*DeleteRangeResponse) ProtoMessage Uses

func (*DeleteRangeResponse) ProtoMessage()

func (*DeleteRangeResponse) Reset Uses

func (m *DeleteRangeResponse) Reset()

func (*DeleteRangeResponse) Size Uses

func (m *DeleteRangeResponse) Size() (n int)

func (*DeleteRangeResponse) String Uses

func (m *DeleteRangeResponse) String() string

func (*DeleteRangeResponse) Unmarshal Uses

func (m *DeleteRangeResponse) Unmarshal(data []byte) error

type DeleteRequest Uses

type DeleteRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A DeleteRequest is the argument to the Delete() method.

func (*DeleteRequest) Descriptor Uses

func (*DeleteRequest) Descriptor() ([]byte, []int)

func (*DeleteRequest) Marshal Uses

func (m *DeleteRequest) Marshal() (data []byte, err error)

func (*DeleteRequest) MarshalTo Uses

func (m *DeleteRequest) MarshalTo(data []byte) (int, error)

func (*DeleteRequest) Method Uses

func (*DeleteRequest) Method() Method

Method implements the Request interface.

func (*DeleteRequest) ProtoMessage Uses

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset Uses

func (m *DeleteRequest) Reset()

func (*DeleteRequest) ShallowCopy Uses

func (dr *DeleteRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*DeleteRequest) Size Uses

func (m *DeleteRequest) Size() (n int)

func (*DeleteRequest) String Uses

func (m *DeleteRequest) String() string

func (*DeleteRequest) Unmarshal Uses

func (m *DeleteRequest) Unmarshal(data []byte) error

type DeleteResponse Uses

type DeleteResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A DeleteResponse is the return value from the Delete() method.

func (*DeleteResponse) Descriptor Uses

func (*DeleteResponse) Descriptor() ([]byte, []int)

func (*DeleteResponse) Marshal Uses

func (m *DeleteResponse) Marshal() (data []byte, err error)

func (*DeleteResponse) MarshalTo Uses

func (m *DeleteResponse) MarshalTo(data []byte) (int, error)

func (*DeleteResponse) ProtoMessage Uses

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset Uses

func (m *DeleteResponse) Reset()

func (*DeleteResponse) Size Uses

func (m *DeleteResponse) Size() (n int)

func (*DeleteResponse) String Uses

func (m *DeleteResponse) String() string

func (*DeleteResponse) Unmarshal Uses

func (m *DeleteResponse) Unmarshal(data []byte) error

type EndTransactionRequest Uses

type EndTransactionRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // False to abort and rollback.
    Commit bool `protobuf:"varint,2,opt,name=commit" json:"commit"`
    // The deadline by which the transaction must commit, if present.
    Deadline *cockroach_util_hlc.Timestamp `protobuf:"bytes,3,opt,name=deadline" json:"deadline,omitempty"`
    // Optional commit triggers. Note that commit triggers are for
    // internal use only and will cause an error if requested through the
    // external-facing KV API.
    InternalCommitTrigger *InternalCommitTrigger `protobuf:"bytes,4,opt,name=internal_commit_trigger,json=internalCommitTrigger" json:"internal_commit_trigger,omitempty"`
    // List of intents written by the transaction.
    IntentSpans []Span `protobuf:"bytes,5,rep,name=intent_spans,json=intentSpans" json:"intent_spans"`
}

An EndTransactionRequest is the argument to the EndTransaction() method. It specifies whether to commit or roll back an extant transaction.

func (*EndTransactionRequest) Descriptor Uses

func (*EndTransactionRequest) Descriptor() ([]byte, []int)

func (*EndTransactionRequest) Marshal Uses

func (m *EndTransactionRequest) Marshal() (data []byte, err error)

func (*EndTransactionRequest) MarshalTo Uses

func (m *EndTransactionRequest) MarshalTo(data []byte) (int, error)

func (*EndTransactionRequest) Method Uses

func (*EndTransactionRequest) Method() Method

Method implements the Request interface.

func (*EndTransactionRequest) ProtoMessage Uses

func (*EndTransactionRequest) ProtoMessage()

func (*EndTransactionRequest) Reset Uses

func (m *EndTransactionRequest) Reset()

func (*EndTransactionRequest) ShallowCopy Uses

func (etr *EndTransactionRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*EndTransactionRequest) Size Uses

func (m *EndTransactionRequest) Size() (n int)

func (*EndTransactionRequest) String Uses

func (m *EndTransactionRequest) String() string

func (*EndTransactionRequest) Unmarshal Uses

func (m *EndTransactionRequest) Unmarshal(data []byte) error

type EndTransactionResponse Uses

type EndTransactionResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // Remaining time (ns).
    CommitWait int64 `protobuf:"varint,2,opt,name=commit_wait,json=commitWait" json:"commit_wait"`
    // Obsolete tag. Removed in #5966.
    DEPRECATEDResolved [][]byte `protobuf:"bytes,3,rep,name=DEPRECATED_resolved,json=dEPRECATEDResolved" json:"DEPRECATED_resolved,omitempty"`
    // True if the transaction committed on the one phase commit path.
    // This means that all writes which were part of the transaction
    // were written as a single, atomic write batch to just one range.
    OnePhaseCommit bool `protobuf:"varint,4,opt,name=one_phase_commit,json=onePhaseCommit" json:"one_phase_commit"`
}

An EndTransactionResponse is the return value from the EndTransaction() method. The final transaction record is returned as part of the response header. In particular, transaction status and timestamp will be updated to reflect final committed values. Clients may propagate the transaction timestamp as the final txn commit timestamp in order to preserve causal ordering between subsequent transactions. CommitWait specifies the commit wait, which is the remaining time the client MUST wait before signalling completion of the transaction to another distributed node to maintain consistency.

func (*EndTransactionResponse) Descriptor Uses

func (*EndTransactionResponse) Descriptor() ([]byte, []int)

func (*EndTransactionResponse) Marshal Uses

func (m *EndTransactionResponse) Marshal() (data []byte, err error)

func (*EndTransactionResponse) MarshalTo Uses

func (m *EndTransactionResponse) MarshalTo(data []byte) (int, error)

func (*EndTransactionResponse) ProtoMessage Uses

func (*EndTransactionResponse) ProtoMessage()

func (*EndTransactionResponse) Reset Uses

func (m *EndTransactionResponse) Reset()

func (*EndTransactionResponse) Size Uses

func (m *EndTransactionResponse) Size() (n int)

func (*EndTransactionResponse) String Uses

func (m *EndTransactionResponse) String() string

func (*EndTransactionResponse) Unmarshal Uses

func (m *EndTransactionResponse) Unmarshal(data []byte) error

type ErrPosition Uses

type ErrPosition struct {
    Index int32 `protobuf:"varint,1,opt,name=index" json:"index"`
}

ErrPosition describes the position of an error in a Batch. A simple nullable primitive field would break compatibility with proto3, where primitive fields are no longer allowed to be nullable.

func (*ErrPosition) Descriptor Uses

func (*ErrPosition) Descriptor() ([]byte, []int)

func (*ErrPosition) Marshal Uses

func (m *ErrPosition) Marshal() (data []byte, err error)

func (*ErrPosition) MarshalTo Uses

func (m *ErrPosition) MarshalTo(data []byte) (int, error)

func (*ErrPosition) ProtoMessage Uses

func (*ErrPosition) ProtoMessage()

func (*ErrPosition) Reset Uses

func (m *ErrPosition) Reset()

func (*ErrPosition) Size Uses

func (m *ErrPosition) Size() (n int)

func (*ErrPosition) String Uses

func (m *ErrPosition) String() string

func (*ErrPosition) Unmarshal Uses

func (m *ErrPosition) Unmarshal(data []byte) error

type Error Uses

type Error struct {
    // message is a human-readable error message.
    Message string `protobuf:"bytes,1,opt,name=message" json:"message"`
    // If transaction_restart is not ABORT, the error condition may be handled by
    // restarting the transaction (with or without a backoff).
    TransactionRestart TransactionRestart `protobuf:"varint,3,opt,name=transaction_restart,json=transactionRestart,enum=cockroach.roachpb.TransactionRestart" json:"transaction_restart"`
    // An optional transaction related to this error. Not to be accessed directly.
    UnexposedTxn *Transaction `protobuf:"bytes,4,opt,name=unexposed_txn,json=unexposedTxn" json:"unexposed_txn,omitempty"`
    // Node at which the error was generated (zero if does not apply).
    OriginNode NodeID `protobuf:"varint,5,opt,name=origin_node,json=originNode,casttype=NodeID" json:"origin_node"`
    // If an ErrorDetail is present, it may contain additional structured data
    // about the error.
    Detail *ErrorDetail `protobuf:"bytes,6,opt,name=detail" json:"detail,omitempty"`
    // The index, if given, contains the index of the request (in the batch)
    // whose execution caused the error.
    Index *ErrPosition `protobuf:"bytes,7,opt,name=index" json:"index,omitempty"`
    // now is the current time at the node sending the response,
    // which can be used by the receiver to update its local HLC.
    Now cockroach_util_hlc.Timestamp `protobuf:"bytes,8,opt,name=now" json:"now"`
}

Error is a generic representation including a string message and information about retryability.

func NewError Uses

func NewError(err error) *Error

NewError creates an Error from the given error.

func NewErrorWithTxn Uses

func NewErrorWithTxn(err error, txn *Transaction) *Error

NewErrorWithTxn creates an Error from the given error and a transaction.

func NewErrorf Uses

func NewErrorf(format string, a ...interface{}) *Error

NewErrorf creates an Error from the given error message. It is a passthrough to fmt.Errorf, with an additional prefix containing the filename and line number.

func (*Error) Descriptor Uses

func (*Error) Descriptor() ([]byte, []int)

func (*Error) GetDetail Uses

func (e *Error) GetDetail() ErrorDetailInterface

GetDetail returns an error detail associated with the error.

func (*Error) GetTxn Uses

func (e *Error) GetTxn() *Transaction

GetTxn returns the txn.

func (*Error) GoError Uses

func (e *Error) GoError() error

GoError returns a Go error converted from Error.

func (*Error) Marshal Uses

func (m *Error) Marshal() (data []byte, err error)

func (*Error) MarshalTo Uses

func (m *Error) MarshalTo(data []byte) (int, error)

func (*Error) ProtoMessage Uses

func (*Error) ProtoMessage()

func (*Error) Reset Uses

func (m *Error) Reset()

func (*Error) SetErrorIndex Uses

func (e *Error) SetErrorIndex(index int32)

SetErrorIndex sets the index of the error.

func (*Error) SetTxn Uses

func (e *Error) SetTxn(txn *Transaction)

SetTxn sets the txn and resets the error message. TODO(kaneda): Unexpose this method and make callers use NewErrorWithTxn.

func (*Error) Size Uses

func (m *Error) Size() (n int)

func (*Error) String Uses

func (e *Error) String() string

String implements fmt.Stringer.

func (*Error) Unmarshal Uses

func (m *Error) Unmarshal(data []byte) error

type ErrorDetail Uses

type ErrorDetail struct {
    NotLeaseHolder                *NotLeaseHolderError                `protobuf:"bytes,1,opt,name=not_lease_holder,json=notLeaseHolder" json:"not_lease_holder,omitempty"`
    RangeNotFound                 *RangeNotFoundError                 `protobuf:"bytes,2,opt,name=range_not_found,json=rangeNotFound" json:"range_not_found,omitempty"`
    RangeKeyMismatch              *RangeKeyMismatchError              `protobuf:"bytes,3,opt,name=range_key_mismatch,json=rangeKeyMismatch" json:"range_key_mismatch,omitempty"`
    ReadWithinUncertaintyInterval *ReadWithinUncertaintyIntervalError `protobuf:"bytes,4,opt,name=read_within_uncertainty_interval,json=readWithinUncertaintyInterval" json:"read_within_uncertainty_interval,omitempty"`
    TransactionAborted            *TransactionAbortedError            `protobuf:"bytes,5,opt,name=transaction_aborted,json=transactionAborted" json:"transaction_aborted,omitempty"`
    TransactionPush               *TransactionPushError               `protobuf:"bytes,6,opt,name=transaction_push,json=transactionPush" json:"transaction_push,omitempty"`
    TransactionRetry              *TransactionRetryError              `protobuf:"bytes,7,opt,name=transaction_retry,json=transactionRetry" json:"transaction_retry,omitempty"`
    TransactionReplay             *TransactionReplayError             `protobuf:"bytes,22,opt,name=transaction_replay,json=transactionReplay" json:"transaction_replay,omitempty"`
    TransactionStatus             *TransactionStatusError             `protobuf:"bytes,8,opt,name=transaction_status,json=transactionStatus" json:"transaction_status,omitempty"`
    WriteIntent                   *WriteIntentError                   `protobuf:"bytes,9,opt,name=write_intent,json=writeIntent" json:"write_intent,omitempty"`
    WriteTooOld                   *WriteTooOldError                   `protobuf:"bytes,10,opt,name=write_too_old,json=writeTooOld" json:"write_too_old,omitempty"`
    OpRequiresTxn                 *OpRequiresTxnError                 `protobuf:"bytes,11,opt,name=op_requires_txn,json=opRequiresTxn" json:"op_requires_txn,omitempty"`
    ConditionFailed               *ConditionFailedError               `protobuf:"bytes,12,opt,name=condition_failed,json=conditionFailed" json:"condition_failed,omitempty"`
    LeaseRejected                 *LeaseRejectedError                 `protobuf:"bytes,13,opt,name=lease_rejected,json=leaseRejected" json:"lease_rejected,omitempty"`
    NodeUnavailable               *NodeUnavailableError               `protobuf:"bytes,14,opt,name=node_unavailable,json=nodeUnavailable" json:"node_unavailable,omitempty"`
    Send                          *SendError                          `protobuf:"bytes,15,opt,name=send" json:"send,omitempty"`
    RangeFrozen                   *RangeFrozenError                   `protobuf:"bytes,25,opt,name=range_frozen,json=rangeFrozen" json:"range_frozen,omitempty"`
    // TODO(kaneda): Following are added to preserve the type when
    // converting Go errors from/to proto Errors. Revisit this design.
    RaftGroupDeleted  *RaftGroupDeletedError  `protobuf:"bytes,16,opt,name=raft_group_deleted,json=raftGroupDeleted" json:"raft_group_deleted,omitempty"`
    ReplicaCorruption *ReplicaCorruptionError `protobuf:"bytes,17,opt,name=replica_corruption,json=replicaCorruption" json:"replica_corruption,omitempty"`
}

ErrorDetail is a union type containing all available errors.

func (*ErrorDetail) Descriptor Uses

func (*ErrorDetail) Descriptor() ([]byte, []int)

func (*ErrorDetail) GetValue Uses

func (this *ErrorDetail) GetValue() interface{}

func (*ErrorDetail) Marshal Uses

func (m *ErrorDetail) Marshal() (data []byte, err error)

func (*ErrorDetail) MarshalTo Uses

func (m *ErrorDetail) MarshalTo(data []byte) (int, error)

func (*ErrorDetail) ProtoMessage Uses

func (*ErrorDetail) ProtoMessage()

func (*ErrorDetail) Reset Uses

func (m *ErrorDetail) Reset()

func (*ErrorDetail) SetValue Uses

func (this *ErrorDetail) SetValue(value interface{}) bool

func (*ErrorDetail) Size Uses

func (m *ErrorDetail) Size() (n int)

func (*ErrorDetail) String Uses

func (m *ErrorDetail) String() string

func (*ErrorDetail) Unmarshal Uses

func (m *ErrorDetail) Unmarshal(data []byte) error

type ErrorDetailInterface Uses

type ErrorDetailInterface interface {
    error
    // contains filtered or unexported methods
}

ErrorDetailInterface is an interface for each error detail.

type ExternalClient Uses

type ExternalClient interface {
    Batch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*BatchResponse, error)
}

func NewExternalClient Uses

func NewExternalClient(cc *grpc.ClientConn) ExternalClient

type ExternalServer Uses

type ExternalServer interface {
    Batch(context.Context, *BatchRequest) (*BatchResponse, error)
}

type GCRequest Uses

type GCRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Keys []GCRequest_GCKey `protobuf:"bytes,3,rep,name=keys" json:"keys"`
    // Threshold is the expiration timestamp.
    Threshold cockroach_util_hlc.Timestamp `protobuf:"bytes,4,opt,name=threshold" json:"threshold"`
}

A GCRequest is arguments to the GC() method. It's sent by range lease holders after scanning range data to find expired MVCC values.

func (*GCRequest) Descriptor Uses

func (*GCRequest) Descriptor() ([]byte, []int)

func (*GCRequest) Marshal Uses

func (m *GCRequest) Marshal() (data []byte, err error)

func (*GCRequest) MarshalTo Uses

func (m *GCRequest) MarshalTo(data []byte) (int, error)

func (*GCRequest) Method Uses

func (*GCRequest) Method() Method

Method implements the Request interface.

func (*GCRequest) ProtoMessage Uses

func (*GCRequest) ProtoMessage()

func (*GCRequest) Reset Uses

func (m *GCRequest) Reset()

func (*GCRequest) ShallowCopy Uses

func (gcr *GCRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*GCRequest) Size Uses

func (m *GCRequest) Size() (n int)

func (*GCRequest) String Uses

func (m *GCRequest) String() string

func (*GCRequest) Unmarshal Uses

func (m *GCRequest) Unmarshal(data []byte) error

type GCRequest_GCKey Uses

type GCRequest_GCKey struct {
    Key       Key                          `protobuf:"bytes,1,opt,name=key,casttype=Key" json:"key,omitempty"`
    Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp"`
}

func (*GCRequest_GCKey) Descriptor Uses

func (*GCRequest_GCKey) Descriptor() ([]byte, []int)

func (*GCRequest_GCKey) Marshal Uses

func (m *GCRequest_GCKey) Marshal() (data []byte, err error)

func (*GCRequest_GCKey) MarshalTo Uses

func (m *GCRequest_GCKey) MarshalTo(data []byte) (int, error)

func (*GCRequest_GCKey) ProtoMessage Uses

func (*GCRequest_GCKey) ProtoMessage()

func (*GCRequest_GCKey) Reset Uses

func (m *GCRequest_GCKey) Reset()

func (*GCRequest_GCKey) Size Uses

func (m *GCRequest_GCKey) Size() (n int)

func (*GCRequest_GCKey) String Uses

func (m *GCRequest_GCKey) String() string

func (*GCRequest_GCKey) Unmarshal Uses

func (m *GCRequest_GCKey) Unmarshal(data []byte) error

type GCResponse Uses

type GCResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A GCResponse is the return value from the GC() method.

func (*GCResponse) Descriptor Uses

func (*GCResponse) Descriptor() ([]byte, []int)

func (*GCResponse) Marshal Uses

func (m *GCResponse) Marshal() (data []byte, err error)

func (*GCResponse) MarshalTo Uses

func (m *GCResponse) MarshalTo(data []byte) (int, error)

func (*GCResponse) ProtoMessage Uses

func (*GCResponse) ProtoMessage()

func (*GCResponse) Reset Uses

func (m *GCResponse) Reset()

func (*GCResponse) Size Uses

func (m *GCResponse) Size() (n int)

func (*GCResponse) String Uses

func (m *GCResponse) String() string

func (*GCResponse) Unmarshal Uses

func (m *GCResponse) Unmarshal(data []byte) error

type GetRequest Uses

type GetRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A GetRequest is the argument for the Get() method.

func (*GetRequest) Descriptor Uses

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) Marshal Uses

func (m *GetRequest) Marshal() (data []byte, err error)

func (*GetRequest) MarshalTo Uses

func (m *GetRequest) MarshalTo(data []byte) (int, error)

func (*GetRequest) Method Uses

func (*GetRequest) Method() Method

Method implements the Request interface.

func (*GetRequest) ProtoMessage Uses

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset Uses

func (m *GetRequest) Reset()

func (*GetRequest) ShallowCopy Uses

func (gr *GetRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*GetRequest) Size Uses

func (m *GetRequest) Size() (n int)

func (*GetRequest) String Uses

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal Uses

func (m *GetRequest) Unmarshal(data []byte) error

type GetResponse Uses

type GetResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Value          *Value `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

A GetResponse is the return value from the Get() method. If the key doesn't exist, returns nil for Value.Bytes.

func (*GetResponse) Descriptor Uses

func (*GetResponse) Descriptor() ([]byte, []int)

func (*GetResponse) Marshal Uses

func (m *GetResponse) Marshal() (data []byte, err error)

func (*GetResponse) MarshalTo Uses

func (m *GetResponse) MarshalTo(data []byte) (int, error)

func (*GetResponse) ProtoMessage Uses

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset Uses

func (m *GetResponse) Reset()

func (*GetResponse) Size Uses

func (m *GetResponse) Size() (n int)

func (*GetResponse) String Uses

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal Uses

func (m *GetResponse) Unmarshal(data []byte) error

func (*GetResponse) Verify Uses

func (gr *GetResponse) Verify(req Request) error

Verify verifies the integrity of the get response value.

type Header struct {
    // timestamp specifies time at which read or writes should be
    // performed. If the timestamp is set to zero value, its value
    // is initialized to the wall time of the receiving node.
    Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp"`
    // replica specifies the destination of the request.
    Replica ReplicaDescriptor `protobuf:"bytes,2,opt,name=replica" json:"replica"`
    // range_id specifies the ID of the Raft consensus group which the key
    // range belongs to. This is used by the receiving node to route the
    // request to the correct range.
    RangeID RangeID `protobuf:"varint,3,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
    // user_priority allows any command's priority to be biased from the
    // default random priority. It specifies a multiple. If set to 0.5,
    // the chosen priority will be 1/2x as likely to beat any default
    // random priority. If set to 1, a default random priority is
    // chosen. If set to 2, the chosen priority will be 2x as likely to
    // beat any default random priority, and so on. As a special case, 0
    // priority is treated the same as 1. This value is ignored if txn
    // is specified. The min and max user priorities are set via
    // MinUserPriority and MaxUserPriority in data.go.
    UserPriority UserPriority `protobuf:"fixed64,4,opt,name=user_priority,json=userPriority,casttype=UserPriority" json:"user_priority"`
    // txn is set non-nil if a transaction is underway. To start a txn,
    // the first request should set this field to non-nil with name and
    // isolation level set as desired. The response will contain the
    // fully-initialized transaction with txn ID, priority, initial
    // timestamp, and maximum timestamp.
    Txn *Transaction `protobuf:"bytes,5,opt,name=txn" json:"txn,omitempty"`
    // read_consistency specifies the consistency for read
    // operations. The default is CONSISTENT. This value is ignored for
    // write operations.
    ReadConsistency ReadConsistencyType `protobuf:"varint,6,opt,name=read_consistency,json=readConsistency,enum=cockroach.roachpb.ReadConsistencyType" json:"read_consistency"`
    // trace, if set, is the active span of an OpenTracing distributed trace.
    Trace *cockroach_util_tracing.Span `protobuf:"bytes,7,opt,name=trace" json:"trace,omitempty"`
    // if set to a non-zero value, limits the total number of results for
    // Scan/ReverseScan requests in the batch.
    MaxScanResults int64 `protobuf:"varint,8,opt,name=max_scan_results,json=maxScanResults" json:"max_scan_results"`
    // if set, all of the spans in the batch are distinct. Note that the
    // calculation of distinct spans does not include intents in an
    // EndTransactionRequest. Currently set conservatively: a request
    // might be composed of distinct spans yet have this field set to
    // false.
    DistinctSpans bool `protobuf:"varint,9,opt,name=distinct_spans,json=distinctSpans" json:"distinct_spans"`
}

A Header is attached to a BatchRequest, encapsulating routing and auxiliary information required for executing it.

func (*Header) Descriptor Uses

func (*Header) Descriptor() ([]byte, []int)

func (Header) GetTxnID Uses

func (h Header) GetTxnID() *uuid.UUID

GetTxnID returns the transaction ID if the header has a transaction or else nil.

func (*Header) Marshal Uses

func (m *Header) Marshal() (data []byte, err error)

func (*Header) MarshalTo Uses

func (m *Header) MarshalTo(data []byte) (int, error)

func (*Header) ProtoMessage Uses

func (*Header) ProtoMessage()

func (*Header) Reset Uses

func (m *Header) Reset()

func (*Header) Size Uses

func (m *Header) Size() (n int)

func (*Header) String Uses

func (m *Header) String() string

func (*Header) Unmarshal Uses

func (m *Header) Unmarshal(data []byte) error

type HeartbeatTxnRequest Uses

type HeartbeatTxnRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Now  cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=now" json:"now"`
}

A HeartbeatTxnRequest is arguments to the HeartbeatTxn() method. It's sent by transaction coordinators to let the system know that the transaction is still ongoing. Note that this heartbeat message is different from the heartbeat message in the gossip protocol.

func (*HeartbeatTxnRequest) Descriptor Uses

func (*HeartbeatTxnRequest) Descriptor() ([]byte, []int)

func (*HeartbeatTxnRequest) Marshal Uses

func (m *HeartbeatTxnRequest) Marshal() (data []byte, err error)

func (*HeartbeatTxnRequest) MarshalTo Uses

func (m *HeartbeatTxnRequest) MarshalTo(data []byte) (int, error)

func (*HeartbeatTxnRequest) Method Uses

func (*HeartbeatTxnRequest) Method() Method

Method implements the Request interface.

func (*HeartbeatTxnRequest) ProtoMessage Uses

func (*HeartbeatTxnRequest) ProtoMessage()

func (*HeartbeatTxnRequest) Reset Uses

func (m *HeartbeatTxnRequest) Reset()

func (*HeartbeatTxnRequest) ShallowCopy Uses

func (htr *HeartbeatTxnRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*HeartbeatTxnRequest) Size Uses

func (m *HeartbeatTxnRequest) Size() (n int)

func (*HeartbeatTxnRequest) String Uses

func (m *HeartbeatTxnRequest) String() string

func (*HeartbeatTxnRequest) Unmarshal Uses

func (m *HeartbeatTxnRequest) Unmarshal(data []byte) error

type HeartbeatTxnResponse Uses

type HeartbeatTxnResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A HeartbeatTxnResponse is the return value from the HeartbeatTxn() method. It returns the transaction info in the response header. The returned transaction lets the coordinator know the disposition of the transaction (i.e. aborted, committed, or pending).

func (*HeartbeatTxnResponse) Descriptor Uses

func (*HeartbeatTxnResponse) Descriptor() ([]byte, []int)

func (*HeartbeatTxnResponse) Marshal Uses

func (m *HeartbeatTxnResponse) Marshal() (data []byte, err error)

func (*HeartbeatTxnResponse) MarshalTo Uses

func (m *HeartbeatTxnResponse) MarshalTo(data []byte) (int, error)

func (*HeartbeatTxnResponse) ProtoMessage Uses

func (*HeartbeatTxnResponse) ProtoMessage()

func (*HeartbeatTxnResponse) Reset Uses

func (m *HeartbeatTxnResponse) Reset()

func (*HeartbeatTxnResponse) Size Uses

func (m *HeartbeatTxnResponse) Size() (n int)

func (*HeartbeatTxnResponse) String Uses

func (m *HeartbeatTxnResponse) String() string

func (*HeartbeatTxnResponse) Unmarshal Uses

func (m *HeartbeatTxnResponse) Unmarshal(data []byte) error

type IncrementRequest Uses

type IncrementRequest struct {
    Span      `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Increment int64 `protobuf:"varint,2,opt,name=increment" json:"increment"`
}

An IncrementRequest is the argument to the Increment() method. It increments the value for key, and returns the new value. If no value exists for a key, incrementing by 0 is not a noop, but will create a zero value. IncrementRequest cannot be called on a key set by Put() or ConditionalPut(). Similarly, Put() and ConditionalPut() cannot be invoked on an incremented key.

func (*IncrementRequest) Descriptor Uses

func (*IncrementRequest) Descriptor() ([]byte, []int)

func (*IncrementRequest) Marshal Uses

func (m *IncrementRequest) Marshal() (data []byte, err error)

func (*IncrementRequest) MarshalTo Uses

func (m *IncrementRequest) MarshalTo(data []byte) (int, error)

func (*IncrementRequest) Method Uses

func (*IncrementRequest) Method() Method

Method implements the Request interface.

func (*IncrementRequest) ProtoMessage Uses

func (*IncrementRequest) ProtoMessage()

func (*IncrementRequest) Reset Uses

func (m *IncrementRequest) Reset()

func (*IncrementRequest) ShallowCopy Uses

func (ir *IncrementRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*IncrementRequest) Size Uses

func (m *IncrementRequest) Size() (n int)

func (*IncrementRequest) String Uses

func (m *IncrementRequest) String() string

func (*IncrementRequest) Unmarshal Uses

func (m *IncrementRequest) Unmarshal(data []byte) error

type IncrementResponse Uses

type IncrementResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    NewValue       int64 `protobuf:"varint,2,opt,name=new_value,json=newValue" json:"new_value"`
}

An IncrementResponse is the return value from the Increment method. The new value after increment is specified in NewValue. If the value could not be decoded as specified, Error will be set.

func (*IncrementResponse) Descriptor Uses

func (*IncrementResponse) Descriptor() ([]byte, []int)

func (*IncrementResponse) Marshal Uses

func (m *IncrementResponse) Marshal() (data []byte, err error)

func (*IncrementResponse) MarshalTo Uses

func (m *IncrementResponse) MarshalTo(data []byte) (int, error)

func (*IncrementResponse) ProtoMessage Uses

func (*IncrementResponse) ProtoMessage()

func (*IncrementResponse) Reset Uses

func (m *IncrementResponse) Reset()

func (*IncrementResponse) Size Uses

func (m *IncrementResponse) Size() (n int)

func (*IncrementResponse) String Uses

func (m *IncrementResponse) String() string

func (*IncrementResponse) Unmarshal Uses

func (m *IncrementResponse) Unmarshal(data []byte) error

type InitPutRequest Uses

type InitPutRequest struct {
    Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
}

An InitPutRequest is the argument to the InitPut() method.

- If key doesn't exist, sets value. - If key exists, returns an error if value != existing value.

func (*InitPutRequest) Descriptor Uses

func (*InitPutRequest) Descriptor() ([]byte, []int)

func (*InitPutRequest) Marshal Uses

func (m *InitPutRequest) Marshal() (data []byte, err error)

func (*InitPutRequest) MarshalTo Uses

func (m *InitPutRequest) MarshalTo(data []byte) (int, error)

func (*InitPutRequest) Method Uses

func (*InitPutRequest) Method() Method

Method implements the Request interface.

func (*InitPutRequest) ProtoMessage Uses

func (*InitPutRequest) ProtoMessage()

func (*InitPutRequest) Reset Uses

func (m *InitPutRequest) Reset()

func (*InitPutRequest) ShallowCopy Uses

func (pr *InitPutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*InitPutRequest) Size Uses

func (m *InitPutRequest) Size() (n int)

func (*InitPutRequest) String Uses

func (m *InitPutRequest) String() string

func (*InitPutRequest) Unmarshal Uses

func (m *InitPutRequest) Unmarshal(data []byte) error

type InitPutResponse Uses

type InitPutResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A InitPutResponse is the return value from the InitPut() method.

func (*InitPutResponse) Descriptor Uses

func (*InitPutResponse) Descriptor() ([]byte, []int)

func (*InitPutResponse) Marshal Uses

func (m *InitPutResponse) Marshal() (data []byte, err error)

func (*InitPutResponse) MarshalTo Uses

func (m *InitPutResponse) MarshalTo(data []byte) (int, error)

func (*InitPutResponse) ProtoMessage Uses

func (*InitPutResponse) ProtoMessage()

func (*InitPutResponse) Reset Uses

func (m *InitPutResponse) Reset()

func (*InitPutResponse) Size Uses

func (m *InitPutResponse) Size() (n int)

func (*InitPutResponse) String Uses

func (m *InitPutResponse) String() string

func (*InitPutResponse) Unmarshal Uses

func (m *InitPutResponse) Unmarshal(data []byte) error

type Intent Uses

type Intent struct {
    Span   `protobuf:"bytes,1,opt,name=span,embedded=span" json:"span"`
    Txn    cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,2,opt,name=txn" json:"txn"`
    Status TransactionStatus                         `protobuf:"varint,3,opt,name=status,enum=cockroach.roachpb.TransactionStatus" json:"status"`
}

A Intent is a Span together with a Transaction metadata and its status.

func (*Intent) Descriptor Uses

func (*Intent) Descriptor() ([]byte, []int)

func (*Intent) Marshal Uses

func (m *Intent) Marshal() (data []byte, err error)

func (*Intent) MarshalTo Uses

func (m *Intent) MarshalTo(data []byte) (int, error)

func (*Intent) ProtoMessage Uses

func (*Intent) ProtoMessage()

func (*Intent) Reset Uses

func (m *Intent) Reset()

func (*Intent) Size Uses

func (m *Intent) Size() (n int)

func (*Intent) String Uses

func (m *Intent) String() string

func (*Intent) Unmarshal Uses

func (m *Intent) Unmarshal(data []byte) error

type InternalClient Uses

type InternalClient interface {
    Batch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*BatchResponse, error)
    PollFrozen(ctx context.Context, in *PollFrozenRequest, opts ...grpc.CallOption) (*PollFrozenResponse, error)
    Reserve(ctx context.Context, in *ReservationRequest, opts ...grpc.CallOption) (*ReservationResponse, error)
}

func NewInternalClient Uses

func NewInternalClient(cc *grpc.ClientConn) InternalClient

type InternalCommitTrigger Uses

type InternalCommitTrigger struct {
    SplitTrigger          *SplitTrigger          `protobuf:"bytes,1,opt,name=split_trigger,json=splitTrigger" json:"split_trigger,omitempty"`
    MergeTrigger          *MergeTrigger          `protobuf:"bytes,2,opt,name=merge_trigger,json=mergeTrigger" json:"merge_trigger,omitempty"`
    ChangeReplicasTrigger *ChangeReplicasTrigger `protobuf:"bytes,3,opt,name=change_replicas_trigger,json=changeReplicasTrigger" json:"change_replicas_trigger,omitempty"`
    ModifiedSpanTrigger   *ModifiedSpanTrigger   `protobuf:"bytes,4,opt,name=modified_span_trigger,json=modifiedSpanTrigger" json:"modified_span_trigger,omitempty"`
}

InternalCommitTrigger encapsulates all of the internal-only commit triggers. Only one may be set.

func (*InternalCommitTrigger) Descriptor Uses

func (*InternalCommitTrigger) Descriptor() ([]byte, []int)

func (*InternalCommitTrigger) GetChangeReplicasTrigger Uses

func (m *InternalCommitTrigger) GetChangeReplicasTrigger() *ChangeReplicasTrigger

func (*InternalCommitTrigger) GetMergeTrigger Uses

func (m *InternalCommitTrigger) GetMergeTrigger() *MergeTrigger

func (*InternalCommitTrigger) GetModifiedSpanTrigger Uses

func (m *InternalCommitTrigger) GetModifiedSpanTrigger() *ModifiedSpanTrigger

func (*InternalCommitTrigger) GetSplitTrigger Uses

func (m *InternalCommitTrigger) GetSplitTrigger() *SplitTrigger

func (*InternalCommitTrigger) Marshal Uses

func (m *InternalCommitTrigger) Marshal() (data []byte, err error)

func (*InternalCommitTrigger) MarshalTo Uses

func (m *InternalCommitTrigger) MarshalTo(data []byte) (int, error)

func (*InternalCommitTrigger) ProtoMessage Uses

func (*InternalCommitTrigger) ProtoMessage()

func (*InternalCommitTrigger) Reset Uses

func (m *InternalCommitTrigger) Reset()

func (*InternalCommitTrigger) Size Uses

func (m *InternalCommitTrigger) Size() (n int)

func (*InternalCommitTrigger) String Uses

func (m *InternalCommitTrigger) String() string

func (*InternalCommitTrigger) Unmarshal Uses

func (m *InternalCommitTrigger) Unmarshal(data []byte) error

type InternalServer Uses

type InternalServer interface {
    Batch(context.Context, *BatchRequest) (*BatchResponse, error)
    PollFrozen(context.Context, *PollFrozenRequest) (*PollFrozenResponse, error)
    Reserve(context.Context, *ReservationRequest) (*ReservationResponse, error)
}

type InternalTimeSeriesData Uses

type InternalTimeSeriesData struct {
    // Holds a wall time, expressed as a unix epoch time in nanoseconds. This
    // represents the earliest possible timestamp for a sample within the
    // collection.
    StartTimestampNanos int64 `protobuf:"varint,1,opt,name=start_timestamp_nanos,json=startTimestampNanos" json:"start_timestamp_nanos"`
    // The duration of each sample interval, expressed in nanoseconds.
    SampleDurationNanos int64 `protobuf:"varint,2,opt,name=sample_duration_nanos,json=sampleDurationNanos" json:"sample_duration_nanos"`
    // The actual data samples for this metric.
    Samples []InternalTimeSeriesSample `protobuf:"bytes,3,rep,name=samples" json:"samples"`
}

InternalTimeSeriesData is a collection of data samples for some measurable value, where each sample is taken over a uniform time interval.

The collection itself contains a start timestamp (in seconds since the unix epoch) and a sample duration (in milliseconds). Each sample in the collection will contain a positive integer offset that indicates the length of time between the start_timestamp of the collection and the time when the sample began, expressed as an whole number of sample intervals. For example, if the sample duration is 60000 (indicating 1 minute), then a contained sample with an offset value of 5 begins (5*60000ms = 300000ms = 5 minutes) after the start timestamp of this data.

This is meant to be an efficient internal representation of time series data, ensuring that very little redundant data is stored on disk. With this goal in mind, this message does not identify the variable which is actually being measured; that information is expected be encoded in the key where this message is stored.

func (*InternalTimeSeriesData) Descriptor Uses

func (*InternalTimeSeriesData) Descriptor() ([]byte, []int)

func (*InternalTimeSeriesData) Marshal Uses

func (m *InternalTimeSeriesData) Marshal() (data []byte, err error)

func (*InternalTimeSeriesData) MarshalTo Uses

func (m *InternalTimeSeriesData) MarshalTo(data []byte) (int, error)

func (*InternalTimeSeriesData) ProtoMessage Uses

func (*InternalTimeSeriesData) ProtoMessage()

func (*InternalTimeSeriesData) Reset Uses

func (m *InternalTimeSeriesData) Reset()

func (*InternalTimeSeriesData) Size Uses

func (m *InternalTimeSeriesData) Size() (n int)

func (*InternalTimeSeriesData) String Uses

func (m *InternalTimeSeriesData) String() string

func (*InternalTimeSeriesData) Unmarshal Uses

func (m *InternalTimeSeriesData) Unmarshal(data []byte) error

type InternalTimeSeriesSample Uses

type InternalTimeSeriesSample struct {
    // Temporal offset from the "start_timestamp" of the InternalTimeSeriesData
    // collection this data point is part in. The units of this value are
    // determined by the value of the "sample_duration_milliseconds" field of
    // the TimeSeriesData collection.
    Offset int32 `protobuf:"varint,1,opt,name=offset" json:"offset"`
    // Sum of all measurements.
    Sum float64 `protobuf:"fixed64,7,opt,name=sum" json:"sum"`
    // Count of measurements taken within this sample.
    Count uint32 `protobuf:"varint,6,opt,name=count" json:"count"`
    // Maximum encountered measurement in this sample.
    Max *float64 `protobuf:"fixed64,8,opt,name=max" json:"max,omitempty"`
    // Minimum encountered measurement in this sample.
    Min *float64 `protobuf:"fixed64,9,opt,name=min" json:"min,omitempty"`
}

A InternalTimeSeriesSample represents data gathered from multiple measurements of a variable value over a given period of time. The length of that period of time is stored in an InternalTimeSeriesData message; a sample cannot be interpreted correctly without a start timestamp and sample duration.

Each sample may contain data gathered from multiple measurements of the same variable, as long as all of those measurements occurred within the sample period. The sample stores several aggregated values from these measurements: - The sum of all measured values - A count of all measurements taken - The maximum individual measurement seen - The minimum individual measurement seen

If zero measurements are present in a sample, then it should be omitted entirely from any collection it would be a part of.

If the count of measurements is 1, then max and min fields may be omitted and assumed equal to the sum field.

func (InternalTimeSeriesSample) Average Uses

func (samp InternalTimeSeriesSample) Average() float64

Average returns the average value for this sample.

func (*InternalTimeSeriesSample) Descriptor Uses

func (*InternalTimeSeriesSample) Descriptor() ([]byte, []int)

func (*InternalTimeSeriesSample) Marshal Uses

func (m *InternalTimeSeriesSample) Marshal() (data []byte, err error)

func (*InternalTimeSeriesSample) MarshalTo Uses

func (m *InternalTimeSeriesSample) MarshalTo(data []byte) (int, error)

func (InternalTimeSeriesSample) Maximum Uses

func (samp InternalTimeSeriesSample) Maximum() float64

Maximum returns the maximum value encountered by this sample.

func (InternalTimeSeriesSample) Minimum Uses

func (samp InternalTimeSeriesSample) Minimum() float64

Minimum returns the minimum value encountered by this sample.

func (*InternalTimeSeriesSample) ProtoMessage Uses

func (*InternalTimeSeriesSample) ProtoMessage()

func (*InternalTimeSeriesSample) Reset Uses

func (m *InternalTimeSeriesSample) Reset()

func (*InternalTimeSeriesSample) Size Uses

func (m *InternalTimeSeriesSample) Size() (n int)

func (*InternalTimeSeriesSample) String Uses

func (m *InternalTimeSeriesSample) String() string

func (InternalTimeSeriesSample) Summation Uses

func (samp InternalTimeSeriesSample) Summation() float64

Summation returns the sum value for this sample.

func (*InternalTimeSeriesSample) Unmarshal Uses

func (m *InternalTimeSeriesSample) Unmarshal(data []byte) error

type Key Uses

type Key []byte

Key is a custom type for a byte string in proto messages which refer to Cockroach keys.

func (Key) Compare Uses

func (k Key) Compare(b interval.Comparable) int

Compare implements the interval.Comparable interface for tree nodes.

func (Key) Equal Uses

func (k Key) Equal(l Key) bool

Equal returns whether two keys are identical.

func (Key) Format Uses

func (k Key) Format(f fmt.State, verb rune)

Format implements the fmt.Formatter interface.

func (Key) IsPrev Uses

func (k Key) IsPrev(m Key) bool

IsPrev is a more efficient version of k.Next().Equal(m).

func (Key) Next Uses

func (k Key) Next() Key

Next returns the next key in lexicographic sort order. The method may only take a shallow copy of the Key, so both the receiver and the return value should be treated as immutable after.

func (Key) PrefixEnd Uses

func (k Key) PrefixEnd() Key

PrefixEnd determines the end key given key as a prefix, that is the key that sorts precisely behind all keys starting with prefix: "1" is added to the final byte and the carry propagated. The special cases of nil and KeyMin always returns KeyMax.

func (Key) String Uses

func (k Key) String() string

String returns a string-formatted version of the key.

type KeyValue Uses

type KeyValue struct {
    Key   Key   `protobuf:"bytes,1,opt,name=key,casttype=Key" json:"key,omitempty"`
    Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
}

KeyValue is a pair of Key and Value for returned Key/Value pairs from ScanRequest/ScanResponse. It embeds a Key and a Value.

func (*KeyValue) Descriptor Uses

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) Marshal Uses

func (m *KeyValue) Marshal() (data []byte, err error)

func (*KeyValue) MarshalTo Uses

func (m *KeyValue) MarshalTo(data []byte) (int, error)

func (*KeyValue) ProtoMessage Uses

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset Uses

func (m *KeyValue) Reset()

func (*KeyValue) Size Uses

func (m *KeyValue) Size() (n int)

func (*KeyValue) String Uses

func (m *KeyValue) String() string

func (*KeyValue) Unmarshal Uses

func (m *KeyValue) Unmarshal(data []byte) error

type KeyValueByKey Uses

type KeyValueByKey []KeyValue

KeyValueByKey implements sorting of a slice of KeyValues by key.

func (KeyValueByKey) Len Uses

func (kv KeyValueByKey) Len() int

Len implements sort.Interface.

func (KeyValueByKey) Less Uses

func (kv KeyValueByKey) Less(i, j int) bool

Less implements sort.Interface.

func (KeyValueByKey) Swap Uses

func (kv KeyValueByKey) Swap(i, j int)

Swap implements sort.Interface.

type Lease Uses

type Lease struct {
    // The start is a timestamp at which the lease begins. This value
    // must be greater than the last lease expiration or the lease request
    // is considered invalid.
    Start cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=start" json:"start"`
    // Before the lease expires, it enters a "stasis period" the length of which
    // is usually determined by the lease holder's maximum allowed clock offset.
    // During this stasis period, the lease must not be used (but can be extended
    // by the owner instead). This prevents a failure of linearizability on a
    // single register during lease changes. Without that stasis period, the
    // following could occur:
    // * a range lease gets committed on the new lease holder (but not the old).
    // * client proposes and commits a write on new lease holder (with a timestamp
    //   just greater than the expiration of the old lease).
    // * client tries to read what it wrote, but hits a slow coordinator
    //   (which assigns a timestamp covered by the old lease).
    // * the read is served by the old lease holder (which has not processed the
    //   change in lease holdership).
    // * the client fails to read their own write.
    //
    // Instead, the old lease holder must refuse to serve the client's command on the
    // basis that its timestamp falls within the stasis period.
    StartStasis cockroach_util_hlc.Timestamp `protobuf:"bytes,4,opt,name=start_stasis,json=startStasis" json:"start_stasis"`
    // The expiration is a timestamp at which the lease expires. This means that
    // a new lease can be granted for a later timestamp.
    Expiration cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=expiration" json:"expiration"`
    // The address of the would-be lease holder.
    Replica ReplicaDescriptor `protobuf:"bytes,3,opt,name=replica" json:"replica"`
}

Lease contains information about range leases including the expiration and lease holder. It defines the two intervals [start, start_stasis) and [start_stasis, expiration). The former encompasses those timestamps for which the lease is active, while the latter is a cooldown period which avoids inconsistencies during lease holder changes as explained below.

func NewPopulatedLease Uses

func NewPopulatedLease(r randyData, easy bool) *Lease

func (Lease) Covers Uses

func (l Lease) Covers(timestamp hlc.Timestamp) bool

Covers returns true if the given timestamp can be served by the Lease. This is the case if the timestamp precedes the Lease's stasis period. Note that the fact that a lease convers a timestamp is not enough for the holder of the lease to be able to serve a read with that timestamp; pendingLeaderLeaseRequest.TransferInProgress() should also be consulted to account for possible lease transfers.

func (*Lease) Descriptor Uses

func (*Lease) Descriptor() ([]byte, []int)

func (*Lease) Marshal Uses

func (m *Lease) Marshal() (data []byte, err error)

func (*Lease) MarshalTo Uses

func (m *Lease) MarshalTo(data []byte) (int, error)

func (Lease) OwnedBy Uses

func (l Lease) OwnedBy(storeID StoreID) bool

OwnedBy returns whether the given store is the lease owner.

func (*Lease) ProtoMessage Uses

func (*Lease) ProtoMessage()

func (*Lease) Reset Uses

func (m *Lease) Reset()

func (*Lease) Size Uses

func (m *Lease) Size() (n int)

func (Lease) String Uses

func (l Lease) String() string

func (*Lease) Unmarshal Uses

func (m *Lease) Unmarshal(data []byte) error

type LeaseRejectedError Uses

type LeaseRejectedError struct {
    Message   string `protobuf:"bytes,1,opt,name=message" json:"message"`
    Requested Lease  `protobuf:"bytes,2,opt,name=requested" json:"requested"`
    Existing  Lease  `protobuf:"bytes,3,opt,name=existing" json:"existing"`
}

A LeaseRejectedError indicates that the requested replica could not acquire the desired lease because of an existing range lease.

func (*LeaseRejectedError) Descriptor Uses

func (*LeaseRejectedError) Descriptor() ([]byte, []int)

func (*LeaseRejectedError) Error Uses

func (e *LeaseRejectedError) Error() string

func (*LeaseRejectedError) Marshal Uses

func (m *LeaseRejectedError) Marshal() (data []byte, err error)

func (*LeaseRejectedError) MarshalTo Uses

func (m *LeaseRejectedError) MarshalTo(data []byte) (int, error)

func (*LeaseRejectedError) ProtoMessage Uses

func (*LeaseRejectedError) ProtoMessage()

func (*LeaseRejectedError) Reset Uses

func (m *LeaseRejectedError) Reset()

func (*LeaseRejectedError) Size Uses

func (m *LeaseRejectedError) Size() (n int)

func (*LeaseRejectedError) String Uses

func (m *LeaseRejectedError) String() string

func (*LeaseRejectedError) Unmarshal Uses

func (m *LeaseRejectedError) Unmarshal(data []byte) error

type MergeRequest Uses

type MergeRequest struct {
    Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
}

A MergeRequest contains arguments to the Merge() method. It specifies a key and a value which should be merged into the existing value at that key.

func (*MergeRequest) Descriptor Uses

func (*MergeRequest) Descriptor() ([]byte, []int)

func (*MergeRequest) Marshal Uses

func (m *MergeRequest) Marshal() (data []byte, err error)

func (*MergeRequest) MarshalTo Uses

func (m *MergeRequest) MarshalTo(data []byte) (int, error)

func (*MergeRequest) Method Uses

func (*MergeRequest) Method() Method

Method implements the Request interface.

func (*MergeRequest) ProtoMessage Uses

func (*MergeRequest) ProtoMessage()

func (*MergeRequest) Reset Uses

func (m *MergeRequest) Reset()

func (*MergeRequest) ShallowCopy Uses

func (mr *MergeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*MergeRequest) Size Uses

func (m *MergeRequest) Size() (n int)

func (*MergeRequest) String Uses

func (m *MergeRequest) String() string

func (*MergeRequest) Unmarshal Uses

func (m *MergeRequest) Unmarshal(data []byte) error

type MergeResponse Uses

type MergeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

MergeResponse is the response to a Merge() operation.

func (*MergeResponse) Descriptor Uses

func (*MergeResponse) Descriptor() ([]byte, []int)

func (*MergeResponse) Marshal Uses

func (m *MergeResponse) Marshal() (data []byte, err error)

func (*MergeResponse) MarshalTo Uses

func (m *MergeResponse) MarshalTo(data []byte) (int, error)

func (*MergeResponse) ProtoMessage Uses

func (*MergeResponse) ProtoMessage()

func (*MergeResponse) Reset Uses

func (m *MergeResponse) Reset()

func (*MergeResponse) Size Uses

func (m *MergeResponse) Size() (n int)

func (*MergeResponse) String Uses

func (m *MergeResponse) String() string

func (*MergeResponse) Unmarshal Uses

func (m *MergeResponse) Unmarshal(data []byte) error

type MergeTrigger Uses

type MergeTrigger struct {
    LeftDesc  RangeDescriptor `protobuf:"bytes,1,opt,name=left_desc,json=leftDesc" json:"left_desc"`
    RightDesc RangeDescriptor `protobuf:"bytes,2,opt,name=right_desc,json=rightDesc" json:"right_desc"`
}

A MergeTrigger is run after a successful commit of an AdminMerge command. It provides the updated left hand side of the split's range descriptor (left_desc) that now encompasses what was originally both ranges and the soon-to-be-invalid range descriptor that used to cover the subsumed, right hand side of the merge (right_desc). This information allows the final bookkeeping for the merge to be completed and put into operation.

func (*MergeTrigger) Descriptor Uses

func (*MergeTrigger) Descriptor() ([]byte, []int)

func (*MergeTrigger) Marshal Uses

func (m *MergeTrigger) Marshal() (data []byte, err error)

func (*MergeTrigger) MarshalTo Uses

func (m *MergeTrigger) MarshalTo(data []byte) (int, error)

func (*MergeTrigger) ProtoMessage Uses

func (*MergeTrigger) ProtoMessage()

func (*MergeTrigger) Reset Uses

func (m *MergeTrigger) Reset()

func (*MergeTrigger) Size Uses

func (m *MergeTrigger) Size() (n int)

func (*MergeTrigger) String Uses

func (m *MergeTrigger) String() string

func (*MergeTrigger) Unmarshal Uses

func (m *MergeTrigger) Unmarshal(data []byte) error

type Method Uses

type Method int

Method is the enumerated type for methods.

const (
    // Get fetches the value for a key from the KV map, respecting a
    // possibly historical timestamp. If the timestamp is 0, returns
    // the most recent value.
    Get Method = iota
    // Put sets the value for a key at the specified timestamp. If the
    // timestamp is 0, the value is set with the current time as timestamp.
    Put
    // ConditionalPut sets the value for a key if the existing value
    // matches the value specified in the request. Specifying a null value
    // for existing means the value must not yet exist.
    ConditionalPut
    // Increment increments the value at the specified key. Once called
    // for a key, Put & ConditionalPut will return errors; only
    // Increment will continue to be a valid command. The value must be
    // deleted before it can be reset using Put.
    Increment
    // Delete removes the value for the specified key.
    Delete
    // DeleteRange removes all values for keys which fall between
    // args.RequestHeader.Key and args.RequestHeader.EndKey, with
    // the latter endpoint excluded.
    DeleteRange
    // Scan fetches the values for all keys which fall between
    // args.RequestHeader.Key and args.RequestHeader.EndKey, with
    // the latter endpoint excluded.
    Scan
    // ReverseScan fetches the values for all keys which fall between
    // args.RequestHeader.Key and args.RequestHeader.EndKey, with
    // the latter endpoint excluded.
    ReverseScan
    // BeginTransaction writes a new transaction record, marking the
    // beginning of the write-portion of a transaction. It is sent
    // exclusively by the coordinating node along with the first
    // transactional write and neither sent nor received by the client
    // itself.
    BeginTransaction
    // EndTransaction either commits or aborts an ongoing transaction.
    EndTransaction
    // AdminSplit is called to coordinate a split of a range.
    AdminSplit
    // AdminMerge is called to coordinate a merge of two adjacent ranges.
    AdminMerge
    // HeartbeatTxn sends a periodic heartbeat to extant
    // transaction rows to indicate the client is still alive and
    // the transaction should not be considered abandoned.
    HeartbeatTxn
    // GC garbage collects values based on expired timestamps
    // for a list of keys in a range. This method is called by the
    // range lease holder after a snapshot scan. The call goes through Raft,
    // so all range replicas GC the exact same values.
    GC
    // PushTxn attempts to resolve read or write conflicts between
    // transactions. Both the pusher (args.Txn) and the pushee
    // (args.PushTxn) are supplied. However, args.Key should be set to the
    // transaction ID of the pushee, as it must be directed to the range
    // containing the pushee's transaction record in order to consult the
    // most up to date txn state. If the conflict resolution can be
    // resolved in favor of the pusher, returns success; otherwise returns
    // an error code either indicating the pusher must retry or abort and
    // restart the transaction.
    PushTxn
    // RangeLookup looks up range descriptors, containing the
    // locations of replicas for the range containing the specified key.
    RangeLookup
    // ResolveIntent resolves existing write intents for a key.
    ResolveIntent
    // ResolveIntentRange resolves existing write intents for a key range.
    ResolveIntentRange
    // Noop is a no-op.
    Noop
    // Merge merges a given value into the specified key. Merge is a
    // high-performance operation provided by underlying data storage for values
    // which are accumulated over several writes. Because it is not
    // transactional, Merge is currently not made available to external clients.
    //
    // The logic used to merge values of different types is described in more
    // detail by the "Merge" method of engine.Engine.
    Merge
    // TruncateLog discards a prefix of the raft log.
    TruncateLog
    // RequestLease requests a range lease for a replica.
    RequestLease
    // TransferLease transfers the range lease from a lease holder to a new one.
    TransferLease
    // ComputeChecksum starts a checksum computation over a replica snapshot.
    ComputeChecksum
    // VerifyChecksum verifies the checksum computed through an earlier
    // ComputeChecksum.
    VerifyChecksum
    // CheckConsistency verifies the consistency of all ranges falling within a
    // key span.
    CheckConsistency
    // InitPut sets the value for a key if the key doesn't exist. It returns
    // an error if the key exists and the existing value is different from the
    // supplied one.
    InitPut
    // ChangeFrozen freezes or unfreezes all Ranges with StartKey in a given
    // key span.
    ChangeFrozen
)

go:generate stringer -type=Method

func (Method) String Uses

func (i Method) String() string

type ModifiedSpanTrigger Uses

type ModifiedSpanTrigger struct {
    SystemConfigSpan bool `protobuf:"varint,1,opt,name=system_config_span,json=systemConfigSpan" json:"system_config_span"`
}

ModifiedSpanTrigger indicates that a specific span has been modified. This can be used to trigger scan-and-gossip for the given span.

func (*ModifiedSpanTrigger) Descriptor Uses

func (*ModifiedSpanTrigger) Descriptor() ([]byte, []int)

func (*ModifiedSpanTrigger) Marshal Uses

func (m *ModifiedSpanTrigger) Marshal() (data []byte, err error)

func (*ModifiedSpanTrigger) MarshalTo Uses

func (m *ModifiedSpanTrigger) MarshalTo(data []byte) (int, error)

func (*ModifiedSpanTrigger) ProtoMessage Uses

func (*ModifiedSpanTrigger) ProtoMessage()

func (*ModifiedSpanTrigger) Reset Uses

func (m *ModifiedSpanTrigger) Reset()

func (*ModifiedSpanTrigger) Size Uses

func (m *ModifiedSpanTrigger) Size() (n int)

func (*ModifiedSpanTrigger) String Uses

func (m *ModifiedSpanTrigger) String() string

func (*ModifiedSpanTrigger) Unmarshal Uses

func (m *ModifiedSpanTrigger) Unmarshal(data []byte) error

type NodeDescriptor Uses

type NodeDescriptor struct {
    NodeID  NodeID                        `protobuf:"varint,1,opt,name=node_id,json=nodeId,casttype=NodeID" json:"node_id"`
    Address cockroach_util.UnresolvedAddr `protobuf:"bytes,2,opt,name=address" json:"address"`
    Attrs   Attributes                    `protobuf:"bytes,3,opt,name=attrs" json:"attrs"`
}

NodeDescriptor holds details on node physical/network topology.

func (*NodeDescriptor) Descriptor Uses

func (*NodeDescriptor) Descriptor() ([]byte, []int)

func (*NodeDescriptor) Marshal Uses

func (m *NodeDescriptor) Marshal() (data []byte, err error)

func (*NodeDescriptor) MarshalTo Uses

func (m *NodeDescriptor) MarshalTo(data []byte) (int, error)

func (*NodeDescriptor) ProtoMessage Uses

func (*NodeDescriptor) ProtoMessage()

func (*NodeDescriptor) Reset Uses

func (m *NodeDescriptor) Reset()

func (*NodeDescriptor) Size Uses

func (m *NodeDescriptor) Size() (n int)

func (*NodeDescriptor) String Uses

func (m *NodeDescriptor) String() string

func (*NodeDescriptor) Unmarshal Uses

func (m *NodeDescriptor) Unmarshal(data []byte) error

type NodeID Uses

type NodeID int32

NodeID is a custom type for a cockroach node ID. (not a raft node ID)

func (NodeID) String Uses

func (n NodeID) String() string

String implements the fmt.Stringer interface. It is used to format the ID for use in Gossip keys.

type NodeUnavailableError Uses

type NodeUnavailableError struct {
}

A NodeUnavailableError indicates that the sending gateway can not process requests at the time, and that the client should retry the request with another peer.

func (*NodeUnavailableError) Descriptor Uses

func (*NodeUnavailableError) Descriptor() ([]byte, []int)

func (*NodeUnavailableError) Error Uses

func (e *NodeUnavailableError) Error() string

func (*NodeUnavailableError) Marshal Uses

func (m *NodeUnavailableError) Marshal() (data []byte, err error)

func (*NodeUnavailableError) MarshalTo Uses

func (m *NodeUnavailableError) MarshalTo(data []byte) (int, error)

func (*NodeUnavailableError) ProtoMessage Uses

func (*NodeUnavailableError) ProtoMessage()

func (*NodeUnavailableError) Reset Uses

func (m *NodeUnavailableError) Reset()

func (*NodeUnavailableError) Size Uses

func (m *NodeUnavailableError) Size() (n int)

func (*NodeUnavailableError) String Uses

func (m *NodeUnavailableError) String() string

func (*NodeUnavailableError) Unmarshal Uses

func (m *NodeUnavailableError) Unmarshal(data []byte) error

type NoopRequest Uses

type NoopRequest struct {
}

A NoopRequest is a no-op.

func (*NoopRequest) Descriptor Uses

func (*NoopRequest) Descriptor() ([]byte, []int)

func (*NoopRequest) Header Uses

func (*NoopRequest) Header() Span

Header implements the Request interface.

func (*NoopRequest) Marshal Uses

func (m *NoopRequest) Marshal() (data []byte, err error)

func (*NoopRequest) MarshalTo Uses

func (m *NoopRequest) MarshalTo(data []byte) (int, error)

func (*NoopRequest) Method Uses

func (*NoopRequest) Method() Method

Method implements the Request interface.

func (*NoopRequest) ProtoMessage Uses

func (*NoopRequest) ProtoMessage()

func (*NoopRequest) Reset Uses

func (m *NoopRequest) Reset()

func (*NoopRequest) SetHeader Uses

func (*NoopRequest) SetHeader(_ Span)

SetHeader implements the Request interface.

func (*NoopRequest) ShallowCopy Uses

func (nr *NoopRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*NoopRequest) Size Uses

func (m *NoopRequest) Size() (n int)

func (*NoopRequest) String Uses

func (m *NoopRequest) String() string

func (*NoopRequest) Unmarshal Uses

func (m *NoopRequest) Unmarshal(data []byte) error

type NoopResponse Uses

type NoopResponse struct {
}

A NoopResponse is the return value from a no-op operation.

func (*NoopResponse) Descriptor Uses

func (*NoopResponse) Descriptor() ([]byte, []int)

func (*NoopResponse) Header Uses

func (*NoopResponse) Header() ResponseHeader

Header implements the Response interface.

func (*NoopResponse) Marshal Uses

func (m *NoopResponse) Marshal() (data []byte, err error)

func (*NoopResponse) MarshalTo Uses

func (m *NoopResponse) MarshalTo(data []byte) (int, error)

func (*NoopResponse) ProtoMessage Uses

func (*NoopResponse) ProtoMessage()

func (*NoopResponse) Reset Uses

func (m *NoopResponse) Reset()

func (*NoopResponse) SetHeader Uses

func (*NoopResponse) SetHeader(_ ResponseHeader)

SetHeader implements the Response interface.

func (*NoopResponse) Size Uses

func (m *NoopResponse) Size() (n int)

func (*NoopResponse) String Uses

func (m *NoopResponse) String() string

func (*NoopResponse) Unmarshal Uses

func (m *NoopResponse) Unmarshal(data []byte) error

func (*NoopResponse) Verify Uses

func (*NoopResponse) Verify(_ Request) error

Verify implements the Response interface.

type NotLeaseHolderError Uses

type NotLeaseHolderError struct {
    Replica     *ReplicaDescriptor `protobuf:"bytes,1,opt,name=replica" json:"replica,omitempty"`
    LeaseHolder *ReplicaDescriptor `protobuf:"bytes,2,opt,name=lease_holder,json=leaseHolder" json:"lease_holder,omitempty"`
    RangeID     RangeID            `protobuf:"varint,3,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
}

A NotLeaseHolderError indicates that the current range is not the lease holder. If the lease holder is known, its Replica is set in the error.

func (*NotLeaseHolderError) Descriptor Uses

func (*NotLeaseHolderError) Descriptor() ([]byte, []int)

func (*NotLeaseHolderError) Error Uses

func (e *NotLeaseHolderError) Error() string

func (*NotLeaseHolderError) Marshal Uses

func (m *NotLeaseHolderError) Marshal() (data []byte, err error)

func (*NotLeaseHolderError) MarshalTo Uses

func (m *NotLeaseHolderError) MarshalTo(data []byte) (int, error)

func (*NotLeaseHolderError) ProtoMessage Uses

func (*NotLeaseHolderError) ProtoMessage()

func (*NotLeaseHolderError) Reset Uses

func (m *NotLeaseHolderError) Reset()

func (*NotLeaseHolderError) Size Uses

func (m *NotLeaseHolderError) Size() (n int)

func (*NotLeaseHolderError) String Uses

func (m *NotLeaseHolderError) String() string

func (*NotLeaseHolderError) Unmarshal Uses

func (m *NotLeaseHolderError) Unmarshal(data []byte) error

type OpRequiresTxnError Uses

type OpRequiresTxnError struct {
}

An OpRequiresTxnError indicates that a command required to be carried out in a transactional context but was not. For example, a Scan which spans ranges requires a transaction. The operation should be retried inside of a transaction.

func (*OpRequiresTxnError) Descriptor Uses

func (*OpRequiresTxnError) Descriptor() ([]byte, []int)

func (*OpRequiresTxnError) Error Uses

func (e *OpRequiresTxnError) Error() string

func (*OpRequiresTxnError) Marshal Uses

func (m *OpRequiresTxnError) Marshal() (data []byte, err error)

func (*OpRequiresTxnError) MarshalTo Uses

func (m *OpRequiresTxnError) MarshalTo(data []byte) (int, error)

func (*OpRequiresTxnError) ProtoMessage Uses

func (*OpRequiresTxnError) ProtoMessage()

func (*OpRequiresTxnError) Reset Uses

func (m *OpRequiresTxnError) Reset()

func (*OpRequiresTxnError) Size Uses

func (m *OpRequiresTxnError) Size() (n int)

func (*OpRequiresTxnError) String Uses

func (m *OpRequiresTxnError) String() string

func (*OpRequiresTxnError) Unmarshal Uses

func (m *OpRequiresTxnError) Unmarshal(data []byte) error

type PollFrozenRequest Uses

type PollFrozenRequest struct {
    StoreRequestHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // When true, collect the frozen Replicas, and the thawed ones otherwise.
    CollectFrozen bool `protobuf:"varint,2,opt,name=collect_frozen,json=collectFrozen" json:"collect_frozen"`
}

A PollFrozenRequest asks the addressed Store for its frozen or thawed Replicas.

func (*PollFrozenRequest) Descriptor Uses

func (*PollFrozenRequest) Descriptor() ([]byte, []int)

func (*PollFrozenRequest) Marshal Uses

func (m *PollFrozenRequest) Marshal() (data []byte, err error)

func (*PollFrozenRequest) MarshalTo Uses

func (m *PollFrozenRequest) MarshalTo(data []byte) (int, error)

func (*PollFrozenRequest) ProtoMessage Uses

func (*PollFrozenRequest) ProtoMessage()

func (*PollFrozenRequest) Reset Uses

func (m *PollFrozenRequest) Reset()

func (*PollFrozenRequest) Size Uses

func (m *PollFrozenRequest) Size() (n int)

func (*PollFrozenRequest) String Uses

func (m *PollFrozenRequest) String() string

func (*PollFrozenRequest) Unmarshal Uses

func (m *PollFrozenRequest) Unmarshal(data []byte) error

type PollFrozenResponse Uses

type PollFrozenResponse struct {
    Results []ReplicaDescriptor `protobuf:"bytes,1,rep,name=results" json:"results"`
}

A PollFrozenResponse is the response returned from a PollFrozenRequest.

func (*PollFrozenResponse) Descriptor Uses

func (*PollFrozenResponse) Descriptor() ([]byte, []int)

func (*PollFrozenResponse) Marshal Uses

func (m *PollFrozenResponse) Marshal() (data []byte, err error)

func (*PollFrozenResponse) MarshalTo Uses

func (m *PollFrozenResponse) MarshalTo(data []byte) (int, error)

func (*PollFrozenResponse) ProtoMessage Uses

func (*PollFrozenResponse) ProtoMessage()

func (*PollFrozenResponse) Reset Uses

func (m *PollFrozenResponse) Reset()

func (*PollFrozenResponse) Size Uses

func (m *PollFrozenResponse) Size() (n int)

func (*PollFrozenResponse) String Uses

func (m *PollFrozenResponse) String() string

func (*PollFrozenResponse) Unmarshal Uses

func (m *PollFrozenResponse) Unmarshal(data []byte) error

type PushTxnRequest Uses

type PushTxnRequest struct {
    Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // Transaction which encountered the intent, if applicable. For a
    // non-transactional operation, pusher_txn will be nil. Used to
    // compare priorities and timestamps if priorities are equal.
    PusherTxn Transaction `protobuf:"bytes,2,opt,name=pusher_txn,json=pusherTxn" json:"pusher_txn"`
    // Transaction to be pushed, as specified at the intent which led to
    // the push transaction request. Note that this may not be the most
    // up-to-date value of the transaction record, but will be set or
    // merged as appropriate.
    PusheeTxn cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,3,opt,name=pushee_txn,json=pusheeTxn" json:"pushee_txn"`
    // PushTo is the timestamp just after which PusheeTxn is attempted to be
    // pushed. During conflict resolution, it should be set to the timestamp
    // of the its conflicting write.
    PushTo cockroach_util_hlc.Timestamp `protobuf:"bytes,4,opt,name=push_to,json=pushTo" json:"push_to"`
    // Now holds the timestamp used to compare the last heartbeat of the pushee
    // against. This is necessary since the request header's timestamp does not
    // necessarily advance with the node clock across retries and hence cannot
    // detect abandoned transactions.
    Now cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=now" json:"now"`
    // Readers set this to PUSH_TIMESTAMP to move pushee_txn's provisional
    // commit timestamp forward. Writers set this to PUSH_ABORT to request
    // that pushee_txn be aborted if possible. Inconsistent readers set
    // this to PUSH_TOUCH to determine whether the pushee can be aborted
    // due to inactivity (based on the now field).
    PushType PushTxnType `protobuf:"varint,6,opt,name=push_type,json=pushType,enum=cockroach.roachpb.PushTxnType" json:"push_type"`
}

A PushTxnRequest is arguments to the PushTxn() method. It's sent by readers or writers which have encountered an "intent" laid down by another transaction. The goal is to resolve the conflict. Note that args.Key should be set to the txn ID of args.PusheeTxn, not args.PusherTxn. This RPC is addressed to the range which owns the pushee's txn record. If the pusher is not transactional, it must be set to a Transaction record with only the Priority present.

Resolution is trivial if the txn which owns the intent has either been committed or aborted already. Otherwise, the existing txn can either be aborted (for write/write conflicts), or its commit timestamp can be moved forward (for read/write conflicts). The course of action is determined by the specified push type, and by the owning txn's status and priority.

func (*PushTxnRequest) Descriptor Uses

func (*PushTxnRequest) Descriptor() ([]byte, []int)

func (*PushTxnRequest) Marshal Uses

func (m *PushTxnRequest) Marshal() (data []byte, err error)

func (*PushTxnRequest) MarshalTo Uses

func (m *PushTxnRequest) MarshalTo(data []byte) (int, error)

func (*PushTxnRequest) Method Uses

func (*PushTxnRequest) Method() Method

Method implements the Request interface.

func (*PushTxnRequest) ProtoMessage Uses

func (*PushTxnRequest) ProtoMessage()

func (*PushTxnRequest) Reset Uses

func (m *PushTxnRequest) Reset()

func (*PushTxnRequest) ShallowCopy Uses

func (ptr *PushTxnRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*PushTxnRequest) Size Uses

func (m *PushTxnRequest) Size() (n int)

func (*PushTxnRequest) String Uses

func (m *PushTxnRequest) String() string

func (*PushTxnRequest) Unmarshal Uses

func (m *PushTxnRequest) Unmarshal(data []byte) error

type PushTxnResponse Uses

type PushTxnResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    // pushee_txn is non-nil if the transaction was pushed and contains
    // the current value of the transaction.
    // TODO(tschottdorf): Maybe this can be a TxnMeta instead; probably requires
    // factoring out the new Priority.
    PusheeTxn Transaction `protobuf:"bytes,2,opt,name=pushee_txn,json=pusheeTxn" json:"pushee_txn"`
}

A PushTxnResponse is the return value from the PushTxn() method. It returns success and the resulting state of PusheeTxn if the conflict was resolved in favor of the caller; the caller should subsequently invoke ResolveIntent() on the conflicted key. It returns an error otherwise.

func (*PushTxnResponse) Descriptor Uses

func (*PushTxnResponse) Descriptor() ([]byte, []int)

func (*PushTxnResponse) Marshal Uses

func (m *PushTxnResponse) Marshal() (data []byte, err error)

func (*PushTxnResponse) MarshalTo Uses

func (m *PushTxnResponse) MarshalTo(data []byte) (int, error)

func (*PushTxnResponse) ProtoMessage Uses

func (*PushTxnResponse) ProtoMessage()

func (*PushTxnResponse) Reset Uses

func (m *PushTxnResponse) Reset()

func (*PushTxnResponse) Size Uses

func (m *PushTxnResponse) Size() (n int)

func (*PushTxnResponse) String Uses

func (m *PushTxnResponse) String() string

func (*PushTxnResponse) Unmarshal Uses

func (m *PushTxnResponse) Unmarshal(data []byte) error

type PushTxnType Uses

type PushTxnType int32

TxnPushType determines what action to take when pushing a transaction.

const (
    // Push the timestamp forward if possible to accommodate a concurrent reader.
    PUSH_TIMESTAMP PushTxnType = 0
    // Abort the transaction if possible to accommodate a concurrent writer.
    PUSH_ABORT PushTxnType = 1
    // Abort the transaction if it's abandoned, but don't attempt to mutate it
    // otherwise.
    PUSH_TOUCH PushTxnType = 2
    // Query and return the latest transaction record if available. If no record
    // is persisted, returns a zero Pushee.
    PUSH_QUERY PushTxnType = 3
)

func (PushTxnType) Enum Uses

func (x PushTxnType) Enum() *PushTxnType

func (PushTxnType) EnumDescriptor Uses

func (PushTxnType) EnumDescriptor() ([]byte, []int)

func (PushTxnType) String Uses

func (x PushTxnType) String() string

func (*PushTxnType) UnmarshalJSON Uses

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

type PutRequest Uses

type PutRequest struct {
    Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
    // Specify as true to put the value without a corresponding
    // timestamp. This option should be used with care as it precludes
    // the use of this value with transactions.
    Inline bool `protobuf:"varint,3,opt,name=inline" json:"inline"`
    // NOTE: For internal use only! Set to indicate that the put is
    // writing to virgin keyspace and no reads are necessary to
    // rationalize MVCC.
    Blind bool `protobuf:"varint,4,opt,name=blind" json:"blind"`
}

A PutRequest is the argument to the Put() method.

func (*PutRequest) Descriptor Uses

func (*PutRequest) Descriptor() ([]byte, []int)

func (*PutRequest) Marshal Uses

func (m *PutRequest) Marshal() (data []byte, err error)

func (*PutRequest) MarshalTo Uses

func (m *PutRequest) MarshalTo(data []byte) (int, error)

func (*PutRequest) Method Uses

func (*PutRequest) Method() Method

Method implements the Request interface.

func (*PutRequest) ProtoMessage Uses

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset Uses

func (m *PutRequest) Reset()

func (*PutRequest) ShallowCopy Uses

func (pr *PutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*PutRequest) Size Uses

func (m *PutRequest) Size() (n int)

func (*PutRequest) String Uses

func (m *PutRequest) String() string

func (*PutRequest) Unmarshal Uses

func (m *PutRequest) Unmarshal(data []byte) error

type PutResponse Uses

type PutResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A PutResponse is the return value from the Put() method.

func (*PutResponse) Descriptor Uses

func (*PutResponse) Descriptor() ([]byte, []int)

func (*PutResponse) Marshal Uses

func (m *PutResponse) Marshal() (data []byte, err error)

func (*PutResponse) MarshalTo Uses

func (m *PutResponse) MarshalTo(data []byte) (int, error)

func (*PutResponse) ProtoMessage Uses

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset Uses

func (m *PutResponse) Reset()

func (*PutResponse) Size Uses

func (m *PutResponse) Size() (n int)

func (*PutResponse) String Uses

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal Uses

func (m *PutResponse) Unmarshal(data []byte) error

type RKey Uses

type RKey Key

RKey denotes a Key whose local addressing has been accounted for. A key can be transformed to an RKey by keys.Addr().

func (RKey) AsRawKey Uses

func (rk RKey) AsRawKey() Key

AsRawKey returns the RKey as a Key. This is to be used only in select situations in which an RKey is known to not contain a wrapped locally- addressed Key. Whenever the Key which created the RKey is still available, it should be used instead.

func (RKey) Equal Uses

func (rk RKey) Equal(other []byte) bool

Equal checks for byte-wise equality.

func (RKey) Less Uses

func (rk RKey) Less(otherRK RKey) bool

Less compares two RKeys.

func (RKey) Next Uses

func (rk RKey) Next() RKey

Next returns the RKey that sorts immediately after the given one. The method may only take a shallow copy of the RKey, so both the receiver and the return value should be treated as immutable after.

func (RKey) PrefixEnd Uses

func (rk RKey) PrefixEnd() RKey

PrefixEnd determines the end key given key as a prefix, that is the key that sorts precisely behind all keys starting with prefix: "1" is added to the final byte and the carry propagated. The special cases of nil and KeyMin always returns KeyMax.

func (RKey) String Uses

func (rk RKey) String() string

type RSpan Uses

type RSpan struct {
    Key, EndKey RKey
}

RSpan is a key range with an inclusive start RKey and an exclusive end RKey.

func (RSpan) ContainsExclusiveEndKey Uses

func (rs RSpan) ContainsExclusiveEndKey(key RKey) bool

ContainsExclusiveEndKey returns whether this span contains the specified (exclusive) end key (e.g., span ["a", b") contains "b" as exclusive end key).

func (RSpan) ContainsKey Uses

func (rs RSpan) ContainsKey(key RKey) bool

ContainsKey returns whether this span contains the specified key.

func (RSpan) ContainsKeyRange Uses

func (rs RSpan) ContainsKeyRange(start, end RKey) bool

ContainsKeyRange returns whether this span contains the specified key range from start (inclusive) to end (exclusive). If end is empty or start is equal to end, returns ContainsKey(start).

func (RSpan) Equal Uses

func (rs RSpan) Equal(o RSpan) bool

Equal compares for equality.

func (RSpan) Intersect Uses

func (rs RSpan) Intersect(desc *RangeDescriptor) (RSpan, error)

Intersect returns the intersection of the current span and the descriptor's range. Returns an error if the span and the descriptor's range do not overlap. TODO(nvanbenschoten) Investigate why this returns an endKey when rs.EndKey is nil. This gives the method unexpected behavior.

type RaftCommand Uses

type RaftCommand struct {
    RangeID       RangeID           `protobuf:"varint,1,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
    OriginReplica ReplicaDescriptor `protobuf:"bytes,2,opt,name=origin_replica,json=originReplica" json:"origin_replica"`
    Cmd           BatchRequest      `protobuf:"bytes,3,opt,name=cmd" json:"cmd"`
    // When the command is applied, its result is an error if the lease log
    // counter has already reached (or exceeded) max_lease_index.
    //
    // The lease index is a replay protection mechanism. Similar to the Raft
    // applied index, it is strictly increasing, but may have gaps. A command
    // will only apply successfully if its max_lease_index has not been surpassed
    // by the Range's applied lease index (in which case the command may need to
    // be 'refurbished', that is, regenerated with a higher max_lease_index).
    // When the command applies, the new lease index will increase to
    // max_lease_index (so a potential later replay will fail).
    //
    // Refurbishment is conditional on whether there is a difference between the
    // local pending and the applying version of the command - if the local copy
    // has a different max_lease_index, an earlier incarnation of the command has
    // already been refurbished, and no repeated refurbishment takes place.
    //
    // This mechanism was introduced as a simpler alternative to using the Raft
    // applied index, which is fraught with complexity due to the need to predict
    // exactly the log position at which a command will apply, even when the Raft
    // leader is not colocated with the lease holder (which usually proposes all
    // commands).
    //
    // Pinning the lease-index to the assigned slot (as opposed to allowing gaps
    // as we do now) is an interesting venue to explore from the standpoint of
    // parallelization: One could hope to enforce command ordering in that way
    // (without recourse to a higher-level locking primitive such as the command
    // queue). This is a hard problem: First of all, managing the pending
    // commands gets more involved; a command must not be removed if others have
    // been added after it, and on removal, the assignment counters must be
    // updated accordingly. Even worse though, refurbishments must be avoided at
    // all costs (since a refurbished command is likely to order after one that
    // it originally preceded (and which may well commit successfully without
    // a refurbishment).
    MaxLeaseIndex uint64 `protobuf:"varint,4,opt,name=max_lease_index,json=maxLeaseIndex" json:"max_lease_index"`
}

A RaftCommand is a command which can be serialized and sent via raft.

func (*RaftCommand) Descriptor Uses

func (*RaftCommand) Descriptor() ([]byte, []int)

func (*RaftCommand) Marshal Uses

func (m *RaftCommand) Marshal() (data []byte, err error)

func (*RaftCommand) MarshalTo Uses

func (m *RaftCommand) MarshalTo(data []byte) (int, error)

func (*RaftCommand) ProtoMessage Uses

func (*RaftCommand) ProtoMessage()

func (*RaftCommand) Reset Uses

func (m *RaftCommand) Reset()

func (*RaftCommand) Size Uses

func (m *RaftCommand) Size() (n int)

func (*RaftCommand) String Uses

func (m *RaftCommand) String() string

func (*RaftCommand) Unmarshal Uses

func (m *RaftCommand) Unmarshal(data []byte) error

type RaftGroupDeletedError Uses

type RaftGroupDeletedError struct {
}

A RaftGroupDeletedError indicates a raft group has been deleted for the replica.

func (*RaftGroupDeletedError) Descriptor Uses

func (*RaftGroupDeletedError) Descriptor() ([]byte, []int)

func (*RaftGroupDeletedError) Error Uses

func (e *RaftGroupDeletedError) Error() string

func (*RaftGroupDeletedError) Marshal Uses

func (m *RaftGroupDeletedError) Marshal() (data []byte, err error)

func (*RaftGroupDeletedError) MarshalTo Uses

func (m *RaftGroupDeletedError) MarshalTo(data []byte) (int, error)

func (*RaftGroupDeletedError) ProtoMessage Uses

func (*RaftGroupDeletedError) ProtoMessage()

func (*RaftGroupDeletedError) Reset Uses

func (m *RaftGroupDeletedError) Reset()

func (*RaftGroupDeletedError) Size Uses

func (m *RaftGroupDeletedError) Size() (n int)

func (*RaftGroupDeletedError) String Uses

func (m *RaftGroupDeletedError) String() string

func (*RaftGroupDeletedError) Unmarshal Uses

func (m *RaftGroupDeletedError) Unmarshal(data []byte) error

type RaftSnapshotData Uses

type RaftSnapshotData struct {
    // The latest RangeDescriptor
    RangeDescriptor RangeDescriptor             `protobuf:"bytes,1,opt,name=range_descriptor,json=rangeDescriptor" json:"range_descriptor"`
    KV              []RaftSnapshotData_KeyValue `protobuf:"bytes,2,rep,name=KV,json=kV" json:"KV"`
    // These are really raftpb.Entry, but we model them as raw bytes to avoid
    // roundtripping through memory.
    LogEntries [][]byte `protobuf:"bytes,3,rep,name=log_entries,json=logEntries" json:"log_entries,omitempty"`
}

RaftSnapshotData is the payload of a raftpb.Snapshot. It contains a raw copy of all of the range's data and metadata, including the raft log, sequence cache, etc.

func (*RaftSnapshotData) Descriptor Uses

func (*RaftSnapshotData) Descriptor() ([]byte, []int)

func (*RaftSnapshotData) Marshal Uses

func (m *RaftSnapshotData) Marshal() (data []byte, err error)

func (*RaftSnapshotData) MarshalTo Uses

func (m *RaftSnapshotData) MarshalTo(data []byte) (int, error)

func (*RaftSnapshotData) ProtoMessage Uses

func (*RaftSnapshotData) ProtoMessage()

func (*RaftSnapshotData) Reset Uses

func (m *RaftSnapshotData) Reset()

func (*RaftSnapshotData) Size Uses

func (m *RaftSnapshotData) Size() (n int)

func (*RaftSnapshotData) String Uses

func (m *RaftSnapshotData) String() string

func (*RaftSnapshotData) Unmarshal Uses

func (m *RaftSnapshotData) Unmarshal(data []byte) error

type RaftSnapshotData_KeyValue Uses

type RaftSnapshotData_KeyValue struct {
    Key       []byte                       `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
    Value     []byte                       `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
    Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"`
}

func (*RaftSnapshotData_KeyValue) Descriptor Uses

func (*RaftSnapshotData_KeyValue) Descriptor() ([]byte, []int)

func (*RaftSnapshotData_KeyValue) Marshal Uses

func (m *RaftSnapshotData_KeyValue) Marshal() (data []byte, err error)

func (*RaftSnapshotData_KeyValue) MarshalTo Uses

func (m *RaftSnapshotData_KeyValue) MarshalTo(data []byte) (int, error)

func (*RaftSnapshotData_KeyValue) ProtoMessage Uses

func (*RaftSnapshotData_KeyValue) ProtoMessage()

func (*RaftSnapshotData_KeyValue) Reset Uses

func (m *RaftSnapshotData_KeyValue) Reset()

func (*RaftSnapshotData_KeyValue) Size Uses

func (m *RaftSnapshotData_KeyValue) Size() (n int)

func (*RaftSnapshotData_KeyValue) String Uses

func (m *RaftSnapshotData_KeyValue) String() string

func (*RaftSnapshotData_KeyValue) Unmarshal Uses

func (m *RaftSnapshotData_KeyValue) Unmarshal(data []byte) error

type RaftTombstone Uses

type RaftTombstone struct {
    NextReplicaID ReplicaID `protobuf:"varint,1,opt,name=next_replica_id,json=nextReplicaId,casttype=ReplicaID" json:"next_replica_id"`
}

RaftTombstone contains information about a replica that has been deleted.

func (*RaftTombstone) Descriptor Uses

func (*RaftTombstone) Descriptor() ([]byte, []int)

func (*RaftTombstone) Marshal Uses

func (m *RaftTombstone) Marshal() (data []byte, err error)

func (*RaftTombstone) MarshalTo Uses

func (m *RaftTombstone) MarshalTo(data []byte) (int, error)

func (*RaftTombstone) ProtoMessage Uses

func (*RaftTombstone) ProtoMessage()

func (*RaftTombstone) Reset Uses

func (m *RaftTombstone) Reset()

func (*RaftTombstone) Size Uses

func (m *RaftTombstone) Size() (n int)

func (*RaftTombstone) String Uses

func (m *RaftTombstone) String() string

func (*RaftTombstone) Unmarshal Uses

func (m *RaftTombstone) Unmarshal(data []byte) error

type RaftTruncatedState Uses

type RaftTruncatedState struct {
    // The highest index that has been removed from the log.
    Index uint64 `protobuf:"varint,1,opt,name=index" json:"index"`
    // The term corresponding to 'index'.
    Term uint64 `protobuf:"varint,2,opt,name=term" json:"term"`
}

RaftTruncatedState contains metadata about the truncated portion of the raft log. Raft requires access to the term of the last truncated log entry even after the rest of the entry has been discarded.

func NewPopulatedRaftTruncatedState Uses

func NewPopulatedRaftTruncatedState(r randyInternalRaft, easy bool) *RaftTruncatedState

func (*RaftTruncatedState) Descriptor Uses

func (*RaftTruncatedState) Descriptor() ([]byte, []int)

func (*RaftTruncatedState) Marshal Uses

func (m *RaftTruncatedState) Marshal() (data []byte, err error)

func (*RaftTruncatedState) MarshalTo Uses

func (m *RaftTruncatedState) MarshalTo(data []byte) (int, error)

func (*RaftTruncatedState) ProtoMessage Uses

func (*RaftTruncatedState) ProtoMessage()

func (*RaftTruncatedState) Reset Uses

func (m *RaftTruncatedState) Reset()

func (*RaftTruncatedState) Size Uses

func (m *RaftTruncatedState) Size() (n int)

func (*RaftTruncatedState) String Uses

func (m *RaftTruncatedState) String() string

func (*RaftTruncatedState) Unmarshal Uses

func (m *RaftTruncatedState) Unmarshal(data []byte) error

type RangeDescriptor Uses

type RangeDescriptor struct {
    RangeID RangeID `protobuf:"varint,1,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
    // start_key is the first key which may be contained by this range.
    StartKey RKey `protobuf:"bytes,2,opt,name=start_key,json=startKey,casttype=RKey" json:"start_key,omitempty"`
    // end_key marks the end of the range's possible keys.  EndKey itself is not
    // contained in this range - it will be contained in the immediately
    // subsequent range.
    EndKey RKey `protobuf:"bytes,3,opt,name=end_key,json=endKey,casttype=RKey" json:"end_key,omitempty"`
    // replicas is the set of nodes/stores on which replicas of this
    // range are stored, the ordering being arbitrary and subject to
    // permutation.
    Replicas []ReplicaDescriptor `protobuf:"bytes,4,rep,name=replicas" json:"replicas"`
    // next_replica_id is a counter used to generate replica IDs.
    NextReplicaID ReplicaID `protobuf:"varint,5,opt,name=next_replica_id,json=nextReplicaId,casttype=ReplicaID" json:"next_replica_id"`
}

RangeDescriptor is the value stored in a range metadata key. A range is described using an inclusive start key, a non-inclusive end key, and a list of replicas where the range is stored.

func (RangeDescriptor) ContainsExclusiveEndKey Uses

func (r RangeDescriptor) ContainsExclusiveEndKey(key RKey) bool

ContainsExclusiveEndKey returns whether this RangeDescriptor contains the specified end key.

func (RangeDescriptor) ContainsKey Uses

func (r RangeDescriptor) ContainsKey(key RKey) bool

ContainsKey returns whether this RangeDescriptor contains the specified key.

func (RangeDescriptor) ContainsKeyRange Uses

func (r RangeDescriptor) ContainsKeyRange(start, end RKey) bool

ContainsKeyRange returns whether this RangeDescriptor contains the specified key range from start (inclusive) to end (exclusive). If end is empty, returns ContainsKey(start).

func (*RangeDescriptor) Descriptor Uses

func (*RangeDescriptor) Descriptor() ([]byte, []int)

func (RangeDescriptor) GetReplicaDescriptor Uses

func (r RangeDescriptor) GetReplicaDescriptor(storeID StoreID) (ReplicaDescriptor, bool)

GetReplicaDescriptor returns the replica which matches the specified store ID.

func (RangeDescriptor) IsInitialized Uses

func (r RangeDescriptor) IsInitialized() bool

IsInitialized returns false if this descriptor represents an uninitialized range. TODO(bdarnell): unify this with Validate().

func (*RangeDescriptor) Marshal Uses

func (m *RangeDescriptor) Marshal() (data []byte, err error)

func (*RangeDescriptor) MarshalTo Uses

func (m *RangeDescriptor) MarshalTo(data []byte) (int, error)

func (*RangeDescriptor) ProtoMessage Uses

func (*RangeDescriptor) ProtoMessage()

func (RangeDescriptor) RSpan Uses

func (r RangeDescriptor) RSpan() RSpan

RSpan returns the RangeDescriptor's resolved span.

func (*RangeDescriptor) Reset Uses

func (m *RangeDescriptor) Reset()

func (*RangeDescriptor) Size Uses

func (m *RangeDescriptor) Size() (n int)

func (*RangeDescriptor) String Uses

func (m *RangeDescriptor) String() string

func (*RangeDescriptor) Unmarshal Uses

func (m *RangeDescriptor) Unmarshal(data []byte) error

func (RangeDescriptor) Validate Uses

func (r RangeDescriptor) Validate() error

Validate performs some basic validation of the contents of a range descriptor.

type RangeFrozenError Uses

type RangeFrozenError struct {
    Desc RangeDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc"`
}

A RangeFrozenError indicates that a Range refused to process a Raft command due to being in frozen state.

func NewRangeFrozenError Uses

func NewRangeFrozenError(desc RangeDescriptor) *RangeFrozenError

NewRangeFrozenError initializes a new RangeFrozenError.

func (*RangeFrozenError) Descriptor Uses

func (*RangeFrozenError) Descriptor() ([]byte, []int)

func (*RangeFrozenError) Error Uses

func (e *RangeFrozenError) Error() string

func (*RangeFrozenError) Marshal Uses

func (m *RangeFrozenError) Marshal() (data []byte, err error)

func (*RangeFrozenError) MarshalTo Uses

func (m *RangeFrozenError) MarshalTo(data []byte) (int, error)

func (*RangeFrozenError) ProtoMessage Uses

func (*RangeFrozenError) ProtoMessage()

func (*RangeFrozenError) Reset Uses

func (m *RangeFrozenError) Reset()

func (*RangeFrozenError) Size Uses

func (m *RangeFrozenError) Size() (n int)

func (*RangeFrozenError) String Uses

func (m *RangeFrozenError) String() string

func (*RangeFrozenError) Unmarshal Uses

func (m *RangeFrozenError) Unmarshal(data []byte) error

type RangeID Uses

type RangeID int64

A RangeID is a unique ID associated to a Raft consensus group.

func (RangeID) String Uses

func (r RangeID) String() string

String implements the fmt.Stringer interface.

type RangeIDSlice Uses

type RangeIDSlice []RangeID

RangeIDSlice implements sort.Interface.

func (RangeIDSlice) Len Uses

func (r RangeIDSlice) Len() int

func (RangeIDSlice) Less Uses

func (r RangeIDSlice) Less(i, j int) bool

func (RangeIDSlice) Swap Uses

func (r RangeIDSlice) Swap(i, j int)

type RangeKeyMismatchError Uses

type RangeKeyMismatchError struct {
    RequestStartKey Key `protobuf:"bytes,1,opt,name=request_start_key,json=requestStartKey,casttype=Key" json:"request_start_key,omitempty"`
    RequestEndKey   Key `protobuf:"bytes,2,opt,name=request_end_key,json=requestEndKey,casttype=Key" json:"request_end_key,omitempty"`
    // mismatched_range is the range that the command was incorrectly sent to.
    // This descriptor will be populated in either of two scenarios:
    // - the command specified a RangeID in its header but the corresponding
    //   range did not fully contain the request's key(s). If so, that specified
    //   range's descriptor will be returned.
    // - the command did not specify a RangeID in its header and the store
    //   it was sent to was not able to find a corresponding range that
    //   fully contained the request. If no range contains the request's
    //   start key, mismatched_range will be nil. If a range contains the
    //   request's start key but the request spans multiple ranges,
    //   mismatched_range will be the descriptor of the range which contains
    //   the start_key of the request.
    MismatchedRange *RangeDescriptor `protobuf:"bytes,3,opt,name=mismatched_range,json=mismatchedRange" json:"mismatched_range,omitempty"`
    // suggested_range is a hint to the sender of a command about the range
    // they may be looking for. This suggestion should be the result of a
    // best effort lookup, and makes no guarantees about correctness.
    SuggestedRange *RangeDescriptor `protobuf:"bytes,4,opt,name=suggested_range,json=suggestedRange" json:"suggested_range,omitempty"`
}

A RangeKeyMismatchError indicates that a command was sent to a range which did not contain the key(s) specified by the command.

func NewRangeKeyMismatchError Uses

func NewRangeKeyMismatchError(start, end Key, desc *RangeDescriptor) *RangeKeyMismatchError

NewRangeKeyMismatchError initializes a new RangeKeyMismatchError.

func (*RangeKeyMismatchError) Descriptor Uses

func (*RangeKeyMismatchError) Descriptor() ([]byte, []int)

func (*RangeKeyMismatchError) Error Uses

func (e *RangeKeyMismatchError) Error() string

func (*RangeKeyMismatchError) Marshal Uses

func (m *RangeKeyMismatchError) Marshal() (data []byte, err error)

func (*RangeKeyMismatchError) MarshalTo Uses

func (m *RangeKeyMismatchError) MarshalTo(data []byte) (int, error)

func (*RangeKeyMismatchError) ProtoMessage Uses

func (*RangeKeyMismatchError) ProtoMessage()

func (*RangeKeyMismatchError) Reset Uses

func (m *RangeKeyMismatchError) Reset()

func (*RangeKeyMismatchError) Size Uses

func (m *RangeKeyMismatchError) Size() (n int)

func (*RangeKeyMismatchError) String Uses

func (m *RangeKeyMismatchError) String() string

func (*RangeKeyMismatchError) Unmarshal Uses

func (m *RangeKeyMismatchError) Unmarshal(data []byte) error

type RangeLookupRequest Uses

type RangeLookupRequest struct {
    Span      `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    MaxRanges int32 `protobuf:"varint,2,opt,name=max_ranges,json=maxRanges" json:"max_ranges"`
    // consider_intents indicates whether or not intents encountered
    // while looking up the range info should be returned to the caller.
    // This is intended to be used when retrying due to range addressing
    // errors.
    ConsiderIntents bool `protobuf:"varint,3,opt,name=consider_intents,json=considerIntents" json:"consider_intents"`
    // Use a reverse scan to pre-fill the range descriptor cache instead
    // of an ascending scan.
    Reverse bool `protobuf:"varint,4,opt,name=reverse" json:"reverse"`
}

A RangeLookupRequest is arguments to the RangeLookup() method. A forward lookup request returns a range containing the requested key. A reverse lookup request returns a range containing the previous key of the requested key (e.g., if a requested key is the end key of range R, the reverse lookup request returns R).

RangeLookupRequest also specifies the maximum number of range descriptors that should be returned, if there are additional consecutive addressable ranges. Specify max_ranges > 1 to pre-fill the range descriptor cache. The additional ranges are scanned in the same direction as lookup (forward v.s. reverse).

func (*RangeLookupRequest) Descriptor Uses

func (*RangeLookupRequest) Descriptor() ([]byte, []int)

func (*RangeLookupRequest) Marshal Uses

func (m *RangeLookupRequest) Marshal() (data []byte, err error)

func (*RangeLookupRequest) MarshalTo Uses

func (m *RangeLookupRequest) MarshalTo(data []byte) (int, error)

func (*RangeLookupRequest) Method Uses

func (*RangeLookupRequest) Method() Method

Method implements the Request interface.

func (*RangeLookupRequest) ProtoMessage Uses

func (*RangeLookupRequest) ProtoMessage()

func (*RangeLookupRequest) Reset Uses

func (m *RangeLookupRequest) Reset()

func (*RangeLookupRequest) ShallowCopy Uses

func (rlr *RangeLookupRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*RangeLookupRequest) Size Uses

func (m *RangeLookupRequest) Size() (n int)

func (*RangeLookupRequest) String Uses

func (m *RangeLookupRequest) String() string

func (*RangeLookupRequest) Unmarshal Uses

func (m *RangeLookupRequest) Unmarshal(data []byte) error

type RangeLookupResponse Uses

type RangeLookupResponse struct {
    ResponseHeader   `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Ranges           []RangeDescriptor `protobuf:"bytes,2,rep,name=ranges" json:"ranges"`
    PrefetchedRanges []RangeDescriptor `protobuf:"bytes,3,rep,name=prefetched_ranges,json=prefetchedRanges" json:"prefetched_ranges"`
}

A RangeLookupResponse is the return value from the RangeLookup() method. It returns metadata for the range containing the requested key, optionally returning the metadata for additional consecutive ranges beyond the requested range to pre-fill the range descriptor cache.

func (*RangeLookupResponse) Descriptor Uses

func (*RangeLookupResponse) Descriptor() ([]byte, []int)

func (*RangeLookupResponse) Marshal Uses

func (m *RangeLookupResponse) Marshal() (data []byte, err error)

func (*RangeLookupResponse) MarshalTo Uses

func (m *RangeLookupResponse) MarshalTo(data []byte) (int, error)

func (*RangeLookupResponse) ProtoMessage Uses

func (*RangeLookupResponse) ProtoMessage()

func (*RangeLookupResponse) Reset Uses

func (m *RangeLookupResponse) Reset()

func (*RangeLookupResponse) Size Uses

func (m *RangeLookupResponse) Size() (n int)

func (*RangeLookupResponse) String Uses

func (m *RangeLookupResponse) String() string

func (*RangeLookupResponse) Unmarshal Uses

func (m *RangeLookupResponse) Unmarshal(data []byte) error

type RangeNotFoundError Uses

type RangeNotFoundError struct {
    RangeID RangeID `protobuf:"varint,1,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
}

A RangeNotFoundError indicates that a command was sent to a range which is not hosted on this store.

func NewRangeNotFoundError Uses

func NewRangeNotFoundError(rangeID RangeID) *RangeNotFoundError

NewRangeNotFoundError initializes a new RangeNotFoundError.

func (*RangeNotFoundError) Descriptor Uses

func (*RangeNotFoundError) Descriptor() ([]byte, []int)

func (*RangeNotFoundError) Error Uses

func (e *RangeNotFoundError) Error() string

func (*RangeNotFoundError) Marshal Uses

func (m *RangeNotFoundError) Marshal() (data []byte, err error)

func (*RangeNotFoundError) MarshalTo Uses

func (m *RangeNotFoundError) MarshalTo(data []byte) (int, error)

func (*RangeNotFoundError) ProtoMessage Uses

func (*RangeNotFoundError) ProtoMessage()

func (*RangeNotFoundError) Reset Uses

func (m *RangeNotFoundError) Reset()

func (*RangeNotFoundError) Size Uses

func (m *RangeNotFoundError) Size() (n int)

func (*RangeNotFoundError) String Uses

func (m *RangeNotFoundError) String() string

func (*RangeNotFoundError) Unmarshal Uses

func (m *RangeNotFoundError) Unmarshal(data []byte) error

type ReadConsistencyType Uses

type ReadConsistencyType int32

ReadConsistencyType specifies what type of consistency is observed during read operations.

const (
    // CONSISTENT reads are guaranteed to read committed data; the
    // mechanism relies on clocks to determine lease expirations.
    CONSISTENT ReadConsistencyType = 0
    // CONSENSUS requires that reads must achieve consensus. This is a
    // stronger guarantee of consistency than CONSISTENT.
    //
    // TODO(spencer): current unimplemented.
    CONSENSUS ReadConsistencyType = 1
    // INCONSISTENT reads return the latest available, committed values.
    // They are more efficient, but may read stale values as pending
    // intents are ignored.
    INCONSISTENT ReadConsistencyType = 2
)

func (ReadConsistencyType) Enum Uses

func (x ReadConsistencyType) Enum() *ReadConsistencyType

func (ReadConsistencyType) EnumDescriptor Uses

func (ReadConsistencyType) EnumDescriptor() ([]byte, []int)

func (ReadConsistencyType) String Uses

func (x ReadConsistencyType) String() string

func (*ReadConsistencyType) UnmarshalJSON Uses

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

type ReadWithinUncertaintyIntervalError Uses

type ReadWithinUncertaintyIntervalError struct {
    ReadTimestamp     cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=read_timestamp,json=readTimestamp" json:"read_timestamp"`
    ExistingTimestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=existing_timestamp,json=existingTimestamp" json:"existing_timestamp"`
}

A ReadWithinUncertaintyIntervalError indicates that a read at timestamp encountered a write within the uncertainty interval of the reader. The read should be retried at a higher timestamp; the timestamps contained within are purely informational, though typically existing_timestamp is a lower bound for a new timestamp at which at least the read producing this error would succeed on retry.

func NewReadWithinUncertaintyIntervalError Uses

func NewReadWithinUncertaintyIntervalError(readTS, existingTS hlc.Timestamp) *ReadWithinUncertaintyIntervalError

NewReadWithinUncertaintyIntervalError creates a new uncertainty retry error. The read and existing timestamps are purely informational and used for formatting the error message.

func (*ReadWithinUncertaintyIntervalError) Descriptor Uses

func (*ReadWithinUncertaintyIntervalError) Descriptor() ([]byte, []int)

func (*ReadWithinUncertaintyIntervalError) Error Uses

func (e *ReadWithinUncertaintyIntervalError) Error() string

func (*ReadWithinUncertaintyIntervalError) Marshal Uses

func (m *ReadWithinUncertaintyIntervalError) Marshal() (data []byte, err error)

func (*ReadWithinUncertaintyIntervalError) MarshalTo Uses

func (m *ReadWithinUncertaintyIntervalError) MarshalTo(data []byte) (int, error)

func (*ReadWithinUncertaintyIntervalError) ProtoMessage Uses

func (*ReadWithinUncertaintyIntervalError) ProtoMessage()

func (*ReadWithinUncertaintyIntervalError) Reset Uses

func (m *ReadWithinUncertaintyIntervalError) Reset()

func (*ReadWithinUncertaintyIntervalError) Size Uses

func (m *ReadWithinUncertaintyIntervalError) Size() (n int)

func (*ReadWithinUncertaintyIntervalError) String Uses

func (m *ReadWithinUncertaintyIntervalError) String() string

func (*ReadWithinUncertaintyIntervalError) Unmarshal Uses

func (m *ReadWithinUncertaintyIntervalError) Unmarshal(data []byte) error

type ReplicaChangeType Uses

type ReplicaChangeType int32

ReplicaChangeType is a parameter of ChangeReplicasTrigger.

const (
    ADD_REPLICA    ReplicaChangeType = 0
    REMOVE_REPLICA ReplicaChangeType = 1
)

func (ReplicaChangeType) Enum Uses

func (x ReplicaChangeType) Enum() *ReplicaChangeType

func (ReplicaChangeType) EnumDescriptor Uses

func (ReplicaChangeType) EnumDescriptor() ([]byte, []int)

func (ReplicaChangeType) String Uses

func (x ReplicaChangeType) String() string

func (*ReplicaChangeType) UnmarshalJSON Uses

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

type ReplicaCorruptionError Uses

type ReplicaCorruptionError struct {
    ErrorMsg string `protobuf:"bytes,1,opt,name=error_msg,json=errorMsg" json:"error_msg"`
    // processed indicates that the error has been taken into account and
    // necessary steps will be taken. For now, required for testing.
    Processed bool `protobuf:"varint,2,opt,name=processed" json:"processed"`
}

A ReplicaCorruptionError indicates that the replica has experienced an error which puts its integrity at risk.

func (*ReplicaCorruptionError) Descriptor Uses

func (*ReplicaCorruptionError) Descriptor() ([]byte, []int)

func (*ReplicaCorruptionError) Error Uses

func (e *ReplicaCorruptionError) Error() string

func (*ReplicaCorruptionError) Marshal Uses

func (m *ReplicaCorruptionError) Marshal() (data []byte, err error)

func (*ReplicaCorruptionError) MarshalTo Uses

func (m *ReplicaCorruptionError) MarshalTo(data []byte) (int, error)

func (*ReplicaCorruptionError) ProtoMessage Uses

func (*ReplicaCorruptionError) ProtoMessage()

func (*ReplicaCorruptionError) Reset Uses

func (m *ReplicaCorruptionError) Reset()

func (*ReplicaCorruptionError) Size Uses

func (m *ReplicaCorruptionError) Size() (n int)

func (*ReplicaCorruptionError) String Uses

func (m *ReplicaCorruptionError) String() string

func (*ReplicaCorruptionError) Unmarshal Uses

func (m *ReplicaCorruptionError) Unmarshal(data []byte) error

type ReplicaDescriptor Uses

type ReplicaDescriptor struct {
    NodeID  NodeID  `protobuf:"varint,1,opt,name=node_id,json=nodeId,casttype=NodeID" json:"node_id"`
    StoreID StoreID `protobuf:"varint,2,opt,name=store_id,json=storeId,casttype=StoreID" json:"store_id"`
    // replica_id uniquely identifies a replica instance. If a range is removed from
    // a store and then re-added to the same store, the new instance will have a
    // higher replica_id.
    ReplicaID ReplicaID `protobuf:"varint,3,opt,name=replica_id,json=replicaId,casttype=ReplicaID" json:"replica_id"`
}

ReplicaDescriptor describes a replica location by node ID (corresponds to a host:port via lookup on gossip network) and store ID (identifies the device).

func NewPopulatedReplicaDescriptor Uses

func NewPopulatedReplicaDescriptor(r randyMetadata, easy bool) *ReplicaDescriptor

func (*ReplicaDescriptor) Descriptor Uses

func (*ReplicaDescriptor) Descriptor() ([]byte, []int)

func (*ReplicaDescriptor) Marshal Uses

func (m *ReplicaDescriptor) Marshal() (data []byte, err error)

func (*ReplicaDescriptor) MarshalTo Uses

func (m *ReplicaDescriptor) MarshalTo(data []byte) (int, error)

func (*ReplicaDescriptor) ProtoMessage Uses

func (*ReplicaDescriptor) ProtoMessage()

func (*ReplicaDescriptor) Reset Uses

func (m *ReplicaDescriptor) Reset()

func (*ReplicaDescriptor) Size Uses

func (m *ReplicaDescriptor) Size() (n int)

func (*ReplicaDescriptor) String Uses

func (m *ReplicaDescriptor) String() string

func (*ReplicaDescriptor) Unmarshal Uses

func (m *ReplicaDescriptor) Unmarshal(data []byte) error

func (ReplicaDescriptor) Validate Uses

func (r ReplicaDescriptor) Validate() error

Validate performs some basic validation of the contents of a replica descriptor.

type ReplicaID Uses

type ReplicaID int32

ReplicaID is a custom type for a range replica ID.

func (ReplicaID) String Uses

func (r ReplicaID) String() string

String implements the fmt.Stringer interface.

type Request Uses

type Request interface {
    proto.Message
    // Header returns the request header.
    Header() Span
    // SetHeader sets the request header.
    SetHeader(Span)
    // Method returns the request method.
    Method() Method
    // ShallowCopy returns a shallow copy of the receiver.
    ShallowCopy() Request
    // contains filtered or unexported methods
}

Request is an interface for RPC requests.

func NewChangeFrozen Uses

func NewChangeFrozen(key, endKey Key, frozen bool, mustVersion string) Request

NewChangeFrozen returns a Request initialized to scan from start to end keys.

func NewCheckConsistency Uses

func NewCheckConsistency(key, endKey Key, withDiff bool) Request

NewCheckConsistency returns a Request initialized to scan from start to end keys.

func NewConditionalPut Uses

func NewConditionalPut(key Key, value, expValue Value) Request

NewConditionalPut returns a Request initialized to put value as a byte slice at key if the existing value at key equals expValueBytes.

func NewDelete Uses

func NewDelete(key Key) Request

NewDelete returns a Request initialized to delete the value at key.

func NewDeleteRange Uses

func NewDeleteRange(startKey, endKey Key, returnKeys bool) Request

NewDeleteRange returns a Request initialized to delete the values in the given key range (excluding the endpoint).

func NewGet Uses

func NewGet(key Key) Request

NewGet returns a Request initialized to get the value at key.

func NewIncrement Uses

func NewIncrement(key Key, increment int64) Request

NewIncrement returns a Request initialized to increment the value at key by increment.

func NewInitPut Uses

func NewInitPut(key Key, value Value) Request

NewInitPut returns a Request initialized to put the value at key, as long as the key doesn't exist, returning an error if the key exists and the existing value is different from value.

func NewPut Uses

func NewPut(key Key, value Value) Request

NewPut returns a Request initialized to put the value at key.

func NewPutInline Uses

func NewPutInline(key Key, value Value) Request

NewPutInline returns a Request initialized to put the value at key using an inline value.

func NewReverseScan Uses

func NewReverseScan(key, endKey Key, maxResults int64) Request

NewReverseScan returns a Request initialized to reverse scan from end to start keys with max results.

func NewScan Uses

func NewScan(key, endKey Key, maxResults int64) Request

NewScan returns a Request initialized to scan from start to end keys with max results.

type RequestLeaseRequest Uses

type RequestLeaseRequest struct {
    Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
    Lease Lease `protobuf:"bytes,2,opt,name=lease" json:"lease"`
}

A RequestLeaseRequest is arguments to the RequestLease() method. It is sent by the store on behalf of one of its ranges upon receipt of a command requiring a lease when none is found.

func (*RequestLeaseRequest) Descriptor Uses

func (*RequestLeaseRequest) Descriptor() ([]byte, []int)

func (*RequestLeaseRequest) Marshal Uses

func (m *RequestLeaseRequest) Marshal() (data []byte, err error)

func (*RequestLeaseRequest) MarshalTo Uses

func (m *RequestLeaseRequest) MarshalTo(data []byte) (int, error)

func (*RequestLeaseRequest) Method Uses

func (*RequestLeaseRequest) Method() Method

Method implements the Request interface.

func (*RequestLeaseRequest) ProtoMessage Uses

func (*RequestLeaseRequest) ProtoMessage()

func (*RequestLeaseRequest) Reset Uses

func (m *RequestLeaseRequest) Reset()

func (*RequestLeaseRequest) ShallowCopy Uses

func (llr *RequestLeaseRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*RequestLeaseRequest) Size Uses

func (m *RequestLeaseRequest) Size() (n int)

func (*RequestLeaseRequest) String Uses

func (m *RequestLeaseRequest) String() string

func (*RequestLeaseRequest) Unmarshal Uses

func (m *RequestLeaseRequest) Unmarshal(data []byte) error

type RequestLeaseResponse Uses

type RequestLeaseResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
}

A RequestLeaseResponse is the response to a RequestLease() or TransferLease() operation.

func (*RequestLeaseResponse) Descriptor Uses

func (*RequestLeaseResponse) Descriptor() ([]byte, []int)

func (*RequestLeaseResponse) Marshal Uses

func (m *RequestLeaseResponse) Marshal() (data []byte, err error)

func (*RequestLeaseResponse) MarshalTo Uses

func (m *RequestLeaseResponse) MarshalTo(data []byte) (int, error)

func (*RequestLeaseResponse) ProtoMessage Uses

func (*RequestLeaseResponse) ProtoMessage()

func (*RequestLeaseResponse) Reset Uses

func (m *RequestLeaseResponse) Reset()

func (*RequestLeaseResponse) Size Uses

func (m *RequestLeaseResponse) Size() (n int)

func (*RequestLeaseResponse) String Uses

func (m *RequestLeaseResponse) String() string

func (*RequestLeaseResponse) Unmarshal Uses

func (m *RequestLeaseResponse) Unmarshal(data []byte) error

type RequestUnion Uses

type RequestUnion struct {
    Get                *GetRequest                `protobuf:"bytes,1,opt,name=get" json:"get,omitempty"`
    Put                *PutRequest                `protobuf:"bytes,2,opt,name=put" json:"put,omitempty"`
    ConditionalPut     *ConditionalPutRequest     `protobuf:"bytes,3,opt,name=conditional_put,json=conditionalPut" json:"conditional_put,omitempty"`
    Increment          *IncrementRequest          `protobuf:"bytes,4,opt,name=increment" json:"increment,omitempty"`
    Delete             *DeleteRequest             `protobuf:"bytes,5,opt,name=delete" json:"delete,omitempty"`
    DeleteRange        *DeleteRangeRequest        `protobuf:"bytes,6,opt,name=delete_range,json=deleteRange" json:"delete_range,omitempty"`
    Scan               *ScanRequest               `protobuf:"bytes,7,opt,name=scan" json:"scan,omitempty"`
    BeginTransaction   *BeginTransactionRequest   `protobuf:"bytes,8,opt,name=begin_transaction,json=beginTransaction" json:"begin_transaction,omitempty"`
    EndTransaction     *EndTransactionRequest     `protobuf:"bytes,9,opt,name=end_transaction,json=endTransaction" json:"end_transaction,omitempty"`
    AdminSplit         *AdminSplitRequest         `protobuf:"bytes,10,opt,name=admin_split,json=adminSplit" json:"admin_split,omitempty"`
    AdminMerge         *AdminMergeRequest         `protobuf:"bytes,11,opt,name=admin_merge,json=adminMerge" json:"admin_merge,omitempty"`
    HeartbeatTxn       *HeartbeatTxnRequest       `protobuf:"bytes,12,opt,name=heartbeat_txn,json=heartbeatTxn" json:"heartbeat_txn,omitempty"`
    Gc                 *GCRequest                 `protobuf:"bytes,13,opt,name=gc" json:"gc,omitempty"`
    PushTxn            *PushTxnRequest            `protobuf:"bytes,14,opt,name=push_txn,json=pushTxn" json:"push_txn,omitempty"`
    RangeLookup        *RangeLookupRequest        `protobuf:"bytes,15,opt,name=range_lookup,json=rangeLookup" json:"range_lookup,omitempty"`
    ResolveIntent      *ResolveIntentRequest      `protobuf:"bytes,16,opt,name=resolve_intent,json=resolveIntent" json:"resolve_intent,omitempty"`
    ResolveIntentRange *ResolveIntentRangeRequest `protobuf:"bytes,17,opt,name=resolve_intent_range,json=resolveIntentRange" json:"resolve_intent_range,omitempty"`
    Merge              *MergeRequest              `protobuf:"bytes,18,opt,name=merge" json:"merge,omitempty"`
    TruncateLog        *TruncateLogRequest        `protobuf:"bytes,19,opt,name=truncate_log,json=truncateLog" json:"truncate_log,omitempty"`
    RequestLease       *RequestLeaseRequest       `protobuf:"bytes,20,opt,name=request_lease,json=requestLease" json:"request_lease,omitempty"`
    ReverseScan        *ReverseScanRequest        `protobuf:"bytes,21,opt,name=reverse_scan,json=reverseScan" json:"reverse_scan,omitempty"`
    ComputeChecksum    *ComputeChecksumRequest    `protobuf:"bytes,22,opt,name=compute_checksum,json=computeChecksum" json:"compute_checksum,omitempty"`
    VerifyChecksum     *VerifyChecksumRequest     `protobuf:"bytes,23,opt,name=verify_checksum,json=verifyChecksum" json:"verify_checksum,omitempty"`
    CheckConsistency   *CheckConsistencyRequest   `protobuf:"bytes,24,opt,name=check_consistency,json=checkConsistency" json:"check_consistency,omitempty"`
    Noop               *NoopRequest               `protobuf:"bytes,25,opt,name=noop" json:"noop,omitempty"`
    InitPut            *InitPutRequest            `protobuf:"bytes,26,opt,name=init_put,json=initPut" json:"init_put,omitempty"`
    ChangeFrozen       *ChangeFrozenRequest       `protobuf:"bytes,27,opt,name=change_frozen,json=changeFrozen" json:"change_frozen,omitempty"`
    TransferLease      *TransferLeaseRequest      `protobuf:"bytes,28,opt,name=transfer_lease,json=transferLease" json:"transfer_lease,omitempty"`
}

A RequestUnion contains exactly one of the optional requests. The values added here must match those in ResponseUnion.

func (*RequestUnion) Descriptor Uses

func (*RequestUnion) Descriptor() ([]byte, []int)

func (RequestUnion) GetInner Uses

func (ru RequestUnion) GetInner() Request

GetInner returns the Request contained in the union.

func (*RequestUnion) GetValue Uses

func (this *RequestUnion) GetValue() interface{}

func (*RequestUnion) Marshal Uses

func (m *RequestUnion) Marshal() (data []byte, err error)

func (*RequestUnion) MarshalTo Uses

func (m *RequestUnion) MarshalTo(data []byte) (int, error)

func (*RequestUnion) MustSetInner Uses

func (ru *RequestUnion) MustSetInner(args Request)

MustSetInner sets the Request contained in the union. It panics if the request is not recognized by the union type. The RequestUnion is reset before being repopulated.

func (*RequestUnion) ProtoMessage Uses

func (*