roachpb

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package roachpb is a generated protocol buffer package.

It is generated from these files:

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

It has these top-level messages:

RangeInfo
ResponseHeader
GetRequest
GetResponse
PutRequest
PutResponse
ConditionalPutRequest
ConditionalPutResponse
InitPutRequest
InitPutResponse
IncrementRequest
IncrementResponse
DeleteRequest
DeleteResponse
DeleteRangeRequest
DeleteRangeResponse
ScanRequest
ScanResponse
ReverseScanRequest
ReverseScanResponse
CheckConsistencyRequest
CheckConsistencyResponse
BeginTransactionRequest
BeginTransactionResponse
EndTransactionRequest
EndTransactionResponse
AdminSplitRequest
AdminSplitResponse
AdminMergeRequest
AdminMergeResponse
AdminTransferLeaseRequest
AdminTransferLeaseResponse
AdminChangeReplicasRequest
AdminChangeReplicasResponse
RangeLookupRequest
RangeLookupResponse
HeartbeatTxnRequest
HeartbeatTxnResponse
GCRequest
GCResponse
PushTxnRequest
PushTxnResponse
QueryTxnRequest
QueryTxnResponse
ResolveIntentRequest
ResolveIntentResponse
ResolveIntentRangeRequest
NoopResponse
NoopRequest
ResolveIntentRangeResponse
MergeRequest
MergeResponse
TruncateLogRequest
TruncateLogResponse
RequestLeaseRequest
TransferLeaseRequest
LeaseInfoRequest
LeaseInfoResponse
RequestLeaseResponse
ComputeChecksumRequest
ComputeChecksumResponse
DeprecatedVerifyChecksumRequest
DeprecatedVerifyChecksumResponse
ExportStorage
WriteBatchRequest
WriteBatchResponse
ExportRequest
BulkOpSummary
ExportResponse
ImportRequest
ImportResponse
AdminScatterRequest
AdminScatterResponse
AddSSTableRequest
AddSSTableResponse
RequestUnion
ResponseUnion
Header
BatchRequest
BatchResponse
StatementStatistics
NumericStat
StatementStatisticsKey
CollectedStatementStatistics
Span
Value
KeyValue
StoreIdent
SplitTrigger
MergeTrigger
ChangeReplicasTrigger
ModifiedSpanTrigger
InternalCommitTrigger
ObservedTimestamp
Transaction
Intent
Lease
AbortCacheEntry
CSVOptions
NotLeaseHolderError
NodeUnavailableError
RangeNotFoundError
RangeKeyMismatchError
ReadWithinUncertaintyIntervalError
TransactionAbortedError
TransactionPushError
TransactionRetryError
TransactionReplayError
TransactionStatusError
WriteIntentError
WriteTooOldError
OpRequiresTxnError
ConditionFailedError
LeaseRejectedError
SendError
AmbiguousResultError
RaftGroupDeletedError
ReplicaCorruptionError
ReplicaTooOldError
StoreNotFoundError
UnhandledRetryableError
HandledRetryableTxnError
UntrackedTxnError
TxnPrevAttemptError
ErrorDetail
ErrPosition
Error
InternalTimeSeriesData
InternalTimeSeriesSample
RaftTruncatedState
RaftTombstone
RaftSnapshotData
Attributes
ReplicationTarget
ReplicaDescriptor
ReplicaIdent
RangeDescriptor
Percentiles
StoreCapacity
NodeDescriptor
StoreDescriptor
StoreDeadReplicas
Locality
Tier
Version

Index

Constants

View Source
const (
	// MinUserPriority is the minimum allowed user priority.
	MinUserPriority = 0.001
	// 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
	// MaxUserPriority is the maximum allowed user priority.
	MaxUserPriority = 1000
)
View Source
const (
	// MinTxnPriority is the minimum allowed txn priority.
	MinTxnPriority = 0
	// MaxTxnPriority is the maximum allowed txn priority.
	MaxTxnPriority = math.MaxInt32
)
View Source
const MaxDiversityScore = 1.0

MaxDiversityScore is the largest possible diversity score, indicating that two localities are as different from each other as possible.

Variables

View Source
var (
	ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthAppStats = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAppStats   = fmt.Errorf("proto: integer overflow")
)
View Source
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 prints a key in human readable format. It's
	// implemented in package git.com/cockroachdb/cockroach/keys to avoid
	// package circle import.
	PrettyPrintKey func(key Key) string

	// PrettyPrintRange prints a key range in human readable format. It's
	// implemented in package git.com/cockroachdb/cockroach/keys to avoid
	// package circle import.
	PrettyPrintRange func(start, end Key, maxChars int) string
)
View Source
var (
	ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowData   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErrors   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInternal   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthInternalRaft = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInternalRaft   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
)
View Source
var ExportStorageProvider_name = map[int32]string{
	0: "Unknown",
	1: "LocalFile",
	2: "Http",
	3: "S3",
	4: "GoogleCloud",
	5: "Azure",
}
View Source
var ExportStorageProvider_value = map[string]int32{
	"Unknown":     0,
	"LocalFile":   1,
	"Http":        2,
	"S3":          3,
	"GoogleCloud": 4,
	"Azure":       5,
}
View Source
var PushTxnType_name = map[int32]string{
	0: "PUSH_TIMESTAMP",
	1: "PUSH_ABORT",
	2: "PUSH_TOUCH",
	3: "PUSH_QUERY",
}
View Source
var PushTxnType_value = map[string]int32{
	"PUSH_TIMESTAMP": 0,
	"PUSH_ABORT":     1,
	"PUSH_TOUCH":     2,
	"PUSH_QUERY":     3,
}
View Source
var ReadConsistencyType_name = map[int32]string{
	0: "CONSISTENT",
	1: "CONSENSUS",
	2: "INCONSISTENT",
}
View Source
var ReadConsistencyType_value = map[string]int32{
	"CONSISTENT":   0,
	"CONSENSUS":    1,
	"INCONSISTENT": 2,
}
View Source
var ReplicaChangeType_name = map[int32]string{
	0: "ADD_REPLICA",
	1: "REMOVE_REPLICA",
}
View Source
var ReplicaChangeType_value = map[string]int32{
	"ADD_REPLICA":    0,
	"REMOVE_REPLICA": 1,
}
View Source
var TransactionRestart_name = map[int32]string{
	0: "NONE",
	1: "BACKOFF",
	2: "IMMEDIATE",
}
View Source
var TransactionRestart_value = map[string]int32{
	"NONE":      0,
	"BACKOFF":   1,
	"IMMEDIATE": 2,
}
View Source
var TransactionRetryReason_name = map[int32]string{
	0: "RETRY_REASON_UNKNOWN",
	1: "RETRY_WRITE_TOO_OLD",
	2: "RETRY_DELETE_RANGE",
	3: "RETRY_SERIALIZABLE",
	4: "RETRY_POSSIBLE_REPLAY",
}
View Source
var TransactionRetryReason_value = map[string]int32{
	"RETRY_REASON_UNKNOWN":  0,
	"RETRY_WRITE_TOO_OLD":   1,
	"RETRY_DELETE_RANGE":    2,
	"RETRY_SERIALIZABLE":    3,
	"RETRY_POSSIBLE_REPLAY": 4,
}
View Source
var TransactionStatus_name = map[int32]string{
	0: "PENDING",
	1: "COMMITTED",
	2: "ABORTED",
}
View Source
var TransactionStatus_value = map[string]int32{
	"PENDING":   0,
	"COMMITTED": 1,
	"ABORTED":   2,
}
View Source
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",
}
View Source
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,
}

Functions

func BytesNext

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 ConsultsTimestampCache

func ConsultsTimestampCache(args Request) bool

ConsultsTimestampCache returns whether the command must consult the timestamp cache to determine whether a mutation is safe at a proposed timestamp or needs to move to a higher timestamp to avoid re-writing history.

func ErrorUnexpectedlySet

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

func IsRange(args Request) bool

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

func IsReadOnly

func IsReadOnly(args Request) bool

IsReadOnly returns true iff the request is read-only.

func IsTransactionWrite

func IsTransactionWrite(args Request) bool

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

func MakePriority

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=NormalUserPriority ( = 1). Balance is achieved when userPriority=NormalUserPriority, in which case the priority chosen is unbiased.

If userPriority is less than or equal to MinUserPriority, returns MinTxnPriority; if greater than or equal to MaxUserPriority, returns MaxTxnPriority. If userPriority is 0, returns NormalUserPriority.

func RegisterExternalServer

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

func RegisterInternalServer

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

func UpdatesTimestampCache

func UpdatesTimestampCache(args Request) bool

UpdatesTimestampCache returns whether the command must update the timestamp cache in order to set a low water mark for the timestamp at which mutations to overlapping key(s) can write such that they don't re-write history.

Types

type AbortCacheEntry

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

func NewPopulatedAbortCacheEntry(r randyData, easy bool) *AbortCacheEntry

func (*AbortCacheEntry) Descriptor

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

func (*AbortCacheEntry) Marshal

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

func (*AbortCacheEntry) MarshalTo

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

func (*AbortCacheEntry) ProtoMessage

func (*AbortCacheEntry) ProtoMessage()

func (*AbortCacheEntry) Reset

func (m *AbortCacheEntry) Reset()

func (*AbortCacheEntry) Size

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

func (*AbortCacheEntry) String

func (m *AbortCacheEntry) String() string

func (*AbortCacheEntry) Unmarshal

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

type AddSSTableRequest added in v1.1.0

type AddSSTableRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
}

AddSSTableRequest is arguments to the AddSSTable() method, to link a file into the RocksDB log-structured merge-tree.

func (*AddSSTableRequest) Descriptor added in v1.1.0

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

func (*AddSSTableRequest) Equal added in v1.1.0

func (this *AddSSTableRequest) Equal(that interface{}) bool

func (*AddSSTableRequest) Marshal added in v1.1.0

func (m *AddSSTableRequest) Marshal() (dAtA []byte, err error)

func (*AddSSTableRequest) MarshalTo added in v1.1.0

func (m *AddSSTableRequest) MarshalTo(dAtA []byte) (int, error)

func (*AddSSTableRequest) Method added in v1.1.0

func (*AddSSTableRequest) Method() Method

Method implements the Request interface.

func (*AddSSTableRequest) ProtoMessage added in v1.1.0

func (*AddSSTableRequest) ProtoMessage()

func (*AddSSTableRequest) Reset added in v1.1.0

func (m *AddSSTableRequest) Reset()

func (*AddSSTableRequest) ShallowCopy added in v1.1.0

func (r *AddSSTableRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AddSSTableRequest) Size added in v1.1.0

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

func (*AddSSTableRequest) String added in v1.1.0

func (m *AddSSTableRequest) String() string

func (*AddSSTableRequest) Unmarshal added in v1.1.0

func (m *AddSSTableRequest) Unmarshal(dAtA []byte) error

type AddSSTableResponse added in v1.1.0

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

AddSSTableResponse is the response to a AddSSTable() operation.

func (*AddSSTableResponse) Descriptor added in v1.1.0

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

func (*AddSSTableResponse) Marshal added in v1.1.0

func (m *AddSSTableResponse) Marshal() (dAtA []byte, err error)

func (*AddSSTableResponse) MarshalTo added in v1.1.0

func (m *AddSSTableResponse) MarshalTo(dAtA []byte) (int, error)

func (*AddSSTableResponse) ProtoMessage added in v1.1.0

func (*AddSSTableResponse) ProtoMessage()

func (*AddSSTableResponse) Reset added in v1.1.0

func (m *AddSSTableResponse) Reset()

func (*AddSSTableResponse) Size added in v1.1.0

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

func (*AddSSTableResponse) String added in v1.1.0

func (m *AddSSTableResponse) String() string

func (*AddSSTableResponse) Unmarshal added in v1.1.0

func (m *AddSSTableResponse) Unmarshal(dAtA []byte) error

type AdminChangeReplicasRequest

type AdminChangeReplicasRequest struct {
	Span       `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	ChangeType ReplicaChangeType   `protobuf:"varint,2,opt,name=change_type,json=changeType,enum=cockroach.roachpb.ReplicaChangeType" json:"change_type"`
	Targets    []ReplicationTarget `protobuf:"bytes,3,rep,name=targets" json:"targets"`
}

An AdminChangeReplicasRequest is the argument to the AdminChangeReplicas() method. A change replicas operation allows adding or removing a set of replicas for a range.

func (*AdminChangeReplicasRequest) Descriptor

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

func (*AdminChangeReplicasRequest) Equal added in v1.1.0

func (this *AdminChangeReplicasRequest) Equal(that interface{}) bool

func (*AdminChangeReplicasRequest) Marshal

func (m *AdminChangeReplicasRequest) Marshal() (dAtA []byte, err error)

func (*AdminChangeReplicasRequest) MarshalTo

func (m *AdminChangeReplicasRequest) MarshalTo(dAtA []byte) (int, error)

func (*AdminChangeReplicasRequest) Method

Method implements the Request interface.

func (*AdminChangeReplicasRequest) ProtoMessage

func (*AdminChangeReplicasRequest) ProtoMessage()

func (*AdminChangeReplicasRequest) Reset

func (m *AdminChangeReplicasRequest) Reset()

func (*AdminChangeReplicasRequest) ShallowCopy

func (acrr *AdminChangeReplicasRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminChangeReplicasRequest) Size

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

func (*AdminChangeReplicasRequest) String

func (m *AdminChangeReplicasRequest) String() string

func (*AdminChangeReplicasRequest) Unmarshal

func (m *AdminChangeReplicasRequest) Unmarshal(dAtA []byte) error

type AdminChangeReplicasResponse

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

func (*AdminChangeReplicasResponse) Descriptor

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

func (*AdminChangeReplicasResponse) Marshal

func (m *AdminChangeReplicasResponse) Marshal() (dAtA []byte, err error)

func (*AdminChangeReplicasResponse) MarshalTo

func (m *AdminChangeReplicasResponse) MarshalTo(dAtA []byte) (int, error)

func (*AdminChangeReplicasResponse) ProtoMessage

func (*AdminChangeReplicasResponse) ProtoMessage()

func (*AdminChangeReplicasResponse) Reset

func (m *AdminChangeReplicasResponse) Reset()

func (*AdminChangeReplicasResponse) Size

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

func (*AdminChangeReplicasResponse) String

func (m *AdminChangeReplicasResponse) String() string

func (*AdminChangeReplicasResponse) Unmarshal

func (m *AdminChangeReplicasResponse) Unmarshal(dAtA []byte) error

type AdminMergeRequest

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

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

func (*AdminMergeRequest) Equal added in v1.1.0

func (this *AdminMergeRequest) Equal(that interface{}) bool

func (*AdminMergeRequest) Marshal

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

func (*AdminMergeRequest) MarshalTo

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

func (*AdminMergeRequest) Method

func (*AdminMergeRequest) Method() Method

Method implements the Request interface.

func (*AdminMergeRequest) ProtoMessage

func (*AdminMergeRequest) ProtoMessage()

func (*AdminMergeRequest) Reset

func (m *AdminMergeRequest) Reset()

func (*AdminMergeRequest) ShallowCopy

func (amr *AdminMergeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminMergeRequest) Size

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

func (*AdminMergeRequest) String

func (m *AdminMergeRequest) String() string

func (*AdminMergeRequest) Unmarshal

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

type AdminMergeResponse

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

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

func (*AdminMergeResponse) Marshal

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

func (*AdminMergeResponse) MarshalTo

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

func (*AdminMergeResponse) ProtoMessage

func (*AdminMergeResponse) ProtoMessage()

func (*AdminMergeResponse) Reset

func (m *AdminMergeResponse) Reset()

func (*AdminMergeResponse) Size

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

func (*AdminMergeResponse) String

func (m *AdminMergeResponse) String() string

func (*AdminMergeResponse) Unmarshal

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

type AdminScatterRequest

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

AdminScatterRequest is the argument to the AdminScatter() method, which moves replicas and leaseholders for a selection of ranges. Scatter is best-effort; ranges that cannot be moved will include an error detail in the response and won't fail the request.

func (*AdminScatterRequest) Descriptor

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

func (*AdminScatterRequest) Equal added in v1.1.0

func (this *AdminScatterRequest) Equal(that interface{}) bool

func (*AdminScatterRequest) Marshal

func (m *AdminScatterRequest) Marshal() (dAtA []byte, err error)

func (*AdminScatterRequest) MarshalTo

func (m *AdminScatterRequest) MarshalTo(dAtA []byte) (int, error)

func (*AdminScatterRequest) Method

func (*AdminScatterRequest) Method() Method

Method implements the Request interface.

func (*AdminScatterRequest) ProtoMessage

func (*AdminScatterRequest) ProtoMessage()

func (*AdminScatterRequest) Reset

func (m *AdminScatterRequest) Reset()

func (*AdminScatterRequest) ShallowCopy

func (r *AdminScatterRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminScatterRequest) Size

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

func (*AdminScatterRequest) String

func (m *AdminScatterRequest) String() string

func (*AdminScatterRequest) Unmarshal

func (m *AdminScatterRequest) Unmarshal(dAtA []byte) error

type AdminScatterResponse

type AdminScatterResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Ranges         []AdminScatterResponse_Range `protobuf:"bytes,2,rep,name=ranges" json:"ranges"`
}

ScatterResponse is the response to a Scatter() operation.

func (*AdminScatterResponse) Descriptor

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

func (*AdminScatterResponse) Marshal

func (m *AdminScatterResponse) Marshal() (dAtA []byte, err error)

func (*AdminScatterResponse) MarshalTo

func (m *AdminScatterResponse) MarshalTo(dAtA []byte) (int, error)

func (*AdminScatterResponse) ProtoMessage

func (*AdminScatterResponse) ProtoMessage()

func (*AdminScatterResponse) Reset

func (m *AdminScatterResponse) Reset()

func (*AdminScatterResponse) Size

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

func (*AdminScatterResponse) String

func (m *AdminScatterResponse) String() string

func (*AdminScatterResponse) Unmarshal

func (m *AdminScatterResponse) Unmarshal(dAtA []byte) error

type AdminScatterResponse_Range

type AdminScatterResponse_Range struct {
	Span Span `protobuf:"bytes,1,opt,name=span" json:"span"`
}

func (*AdminScatterResponse_Range) Descriptor

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

func (*AdminScatterResponse_Range) Marshal

func (m *AdminScatterResponse_Range) Marshal() (dAtA []byte, err error)

func (*AdminScatterResponse_Range) MarshalTo

func (m *AdminScatterResponse_Range) MarshalTo(dAtA []byte) (int, error)

func (*AdminScatterResponse_Range) ProtoMessage

func (*AdminScatterResponse_Range) ProtoMessage()

func (*AdminScatterResponse_Range) Reset

func (m *AdminScatterResponse_Range) Reset()

func (*AdminScatterResponse_Range) Size

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

func (*AdminScatterResponse_Range) String

func (m *AdminScatterResponse_Range) String() string

func (*AdminScatterResponse_Range) Unmarshal

func (m *AdminScatterResponse_Range) Unmarshal(dAtA []byte) error

type AdminSplitRequest

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

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

func (*AdminSplitRequest) Equal added in v1.1.0

func (this *AdminSplitRequest) Equal(that interface{}) bool

func (*AdminSplitRequest) Marshal

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

func (*AdminSplitRequest) MarshalTo

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

func (*AdminSplitRequest) Method

func (*AdminSplitRequest) Method() Method

Method implements the Request interface.

func (*AdminSplitRequest) ProtoMessage

func (*AdminSplitRequest) ProtoMessage()

func (*AdminSplitRequest) Reset

func (m *AdminSplitRequest) Reset()

func (*AdminSplitRequest) ShallowCopy

func (asr *AdminSplitRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminSplitRequest) Size

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

func (*AdminSplitRequest) String

func (m *AdminSplitRequest) String() string

func (*AdminSplitRequest) Unmarshal

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

type AdminSplitResponse

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

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

func (*AdminSplitResponse) Marshal

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

func (*AdminSplitResponse) MarshalTo

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

func (*AdminSplitResponse) ProtoMessage

func (*AdminSplitResponse) ProtoMessage()

func (*AdminSplitResponse) Reset

func (m *AdminSplitResponse) Reset()

func (*AdminSplitResponse) Size

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

func (*AdminSplitResponse) String

func (m *AdminSplitResponse) String() string

func (*AdminSplitResponse) Unmarshal

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

type AdminTransferLeaseRequest

type AdminTransferLeaseRequest struct {
	Span   `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Target StoreID `protobuf:"varint,2,opt,name=target,casttype=StoreID" json:"target"`
}

An AdminTransferLeaseRequest is the argument to the AdminTransferLease() method. A lease transfer allows an external entity to control the lease holder for a range. The target of the lease transfer needs to be a valid replica of the range.

func (*AdminTransferLeaseRequest) Descriptor

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

func (*AdminTransferLeaseRequest) Equal added in v1.1.0

func (this *AdminTransferLeaseRequest) Equal(that interface{}) bool

func (*AdminTransferLeaseRequest) Marshal

func (m *AdminTransferLeaseRequest) Marshal() (dAtA []byte, err error)

func (*AdminTransferLeaseRequest) MarshalTo

func (m *AdminTransferLeaseRequest) MarshalTo(dAtA []byte) (int, error)

func (*AdminTransferLeaseRequest) Method

Method implements the Request interface.

func (*AdminTransferLeaseRequest) ProtoMessage

func (*AdminTransferLeaseRequest) ProtoMessage()

func (*AdminTransferLeaseRequest) Reset

func (m *AdminTransferLeaseRequest) Reset()

func (*AdminTransferLeaseRequest) ShallowCopy

func (atlr *AdminTransferLeaseRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminTransferLeaseRequest) Size

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

func (*AdminTransferLeaseRequest) String

func (m *AdminTransferLeaseRequest) String() string

func (*AdminTransferLeaseRequest) Unmarshal

func (m *AdminTransferLeaseRequest) Unmarshal(dAtA []byte) error

type AdminTransferLeaseResponse

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

func (*AdminTransferLeaseResponse) Descriptor

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

func (*AdminTransferLeaseResponse) Marshal

func (m *AdminTransferLeaseResponse) Marshal() (dAtA []byte, err error)

func (*AdminTransferLeaseResponse) MarshalTo

func (m *AdminTransferLeaseResponse) MarshalTo(dAtA []byte) (int, error)

func (*AdminTransferLeaseResponse) ProtoMessage

func (*AdminTransferLeaseResponse) ProtoMessage()

func (*AdminTransferLeaseResponse) Reset

func (m *AdminTransferLeaseResponse) Reset()

func (*AdminTransferLeaseResponse) Size

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

func (*AdminTransferLeaseResponse) String

func (m *AdminTransferLeaseResponse) String() string

func (*AdminTransferLeaseResponse) Unmarshal

func (m *AdminTransferLeaseResponse) Unmarshal(dAtA []byte) error

type AmbiguousResultError

type AmbiguousResultError struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message"`
	// This can be set to give extra information about which error was converted
	// into an AmbiguousResultError. Useful for tests.
	WrappedErr *Error `protobuf:"bytes,2,opt,name=wrapped_err,json=wrappedErr" json:"wrapped_err,omitempty"`
}

An AmbiguousResultError indicates that a request may have succeeded or failed, but the response was not received and the final result is ambiguous.

func NewAmbiguousResultError

func NewAmbiguousResultError(msg string) *AmbiguousResultError

NewAmbiguousResultError initializes a new AmbiguousResultError with an explanatory message.

func (*AmbiguousResultError) Descriptor

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

func (*AmbiguousResultError) Equal added in v1.1.0

func (this *AmbiguousResultError) Equal(that interface{}) bool

func (*AmbiguousResultError) Error

func (e *AmbiguousResultError) Error() string

func (*AmbiguousResultError) Marshal

func (m *AmbiguousResultError) Marshal() (dAtA []byte, err error)

func (*AmbiguousResultError) MarshalTo

func (m *AmbiguousResultError) MarshalTo(dAtA []byte) (int, error)

func (*AmbiguousResultError) ProtoMessage

func (*AmbiguousResultError) ProtoMessage()

func (*AmbiguousResultError) Reset

func (m *AmbiguousResultError) Reset()

func (*AmbiguousResultError) Size

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

func (*AmbiguousResultError) String

func (m *AmbiguousResultError) String() string

func (*AmbiguousResultError) Unmarshal

func (m *AmbiguousResultError) Unmarshal(dAtA []byte) error

type Attributes

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

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

func (Attributes) IsSubset

func (a Attributes) IsSubset(b Attributes) bool

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

func (*Attributes) Marshal

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

func (*Attributes) MarshalTo

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

func (*Attributes) ProtoMessage

func (*Attributes) ProtoMessage()

func (*Attributes) Reset

func (m *Attributes) Reset()

func (*Attributes) Size

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

func (Attributes) SortedString

func (a Attributes) SortedString() string

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

func (Attributes) String

func (a Attributes) String() string

func (*Attributes) Unmarshal

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

type BatchRequest

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

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

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.

func (*BatchRequest) Descriptor

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

func (*BatchRequest) GetArg

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) GetPrevLeaseForLeaseRequest

func (ba *BatchRequest) GetPrevLeaseForLeaseRequest() Lease

GetPrevLeaseForLeaseRequest returns the previous lease, at the time of proposal, for a request lease or transfer lease request. If the batch does not contain a single lease request, this method will panic.

func (*BatchRequest) GetUser

func (*BatchRequest) GetUser() string

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

func (*BatchRequest) IntentSpanIterate

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

IntentSpanIterate calls the passed method with the key ranges of the transactional writes contained in the batch. Usually the key spans contained in the requests are used, but when a response contains a ResumeSpan the ResumeSpan is subtracted from the request span to provide a more minimal span of keys affected by the request.

func (*BatchRequest) IsAdmin

func (ba *BatchRequest) IsAdmin() bool

IsAdmin returns true iff the BatchRequest contains an admin request.

func (*BatchRequest) IsLeaseRequest

func (ba *BatchRequest) IsLeaseRequest() bool

IsLeaseRequest returns whether the batch consists of a single RequestLease request. Note that TransferLease requests return false. RequestLease requests are special because they're the only type of requests a non-lease-holder can propose.

func (*BatchRequest) IsPossibleTransaction

func (ba *BatchRequest) IsPossibleTransaction() bool

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

func (*BatchRequest) IsReadOnly

func (ba *BatchRequest) IsReadOnly() bool

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

func (*BatchRequest) IsReverse

func (ba *BatchRequest) IsReverse() bool

IsReverse returns true iff the BatchRequest contains a reverse request.

func (*BatchRequest) IsSinglePushTxnRequest

func (ba *BatchRequest) IsSinglePushTxnRequest() bool

IsSinglePushTxnRequest returns true iff the batch contains a single request, and that request is for a PushTxn.

func (*BatchRequest) IsSingleQueryTxnRequest added in v1.1.0

func (ba *BatchRequest) IsSingleQueryTxnRequest() bool

IsSingleQueryTxnRequest returns true iff the batch contains a single request, and that request is for a QueryTxn.

func (*BatchRequest) IsSingleRequest

func (ba *BatchRequest) IsSingleRequest() bool

IsSingleRequest returns true iff the BatchRequest contains a single request.

func (*BatchRequest) IsSingleSkipLeaseCheckRequest

func (ba *BatchRequest) IsSingleSkipLeaseCheckRequest() bool

IsSingleSkipLeaseCheckRequest returns true iff the batch contains a single request, and that request has the skipLeaseCheck flag set.

func (*BatchRequest) IsTransactionWrite

func (ba *BatchRequest) IsTransactionWrite() bool

IsTransactionWrite returns true iff the BatchRequest contains a txn write.

func (*BatchRequest) IsWrite

func (ba *BatchRequest) IsWrite() bool

IsWrite returns true iff the BatchRequest contains a write.

func (*BatchRequest) Marshal

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

func (*BatchRequest) MarshalTo

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

func (*BatchRequest) Methods

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

Methods returns a slice of the contained methods.

func (*BatchRequest) ProtoMessage

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) Reset

func (m *BatchRequest) Reset()

func (*BatchRequest) SetActiveTimestamp

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

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

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

func (BatchRequest) Split

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

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) Summary

func (ba *BatchRequest) Summary() string

Summary prints a short summary of the requests in a batch.

func (*BatchRequest) Unmarshal

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

func (*BatchRequest) UpdateTxn

func (ba *BatchRequest) UpdateTxn(otherTxn *Transaction)

UpdateTxn updates the batch transaction from the supplied one in a copy-on-write fashion, i.e. without mutating an existing Transaction struct.

type BatchResponse

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

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

func (br *BatchResponse) Combine(otherBatch *BatchResponse, positions []int) 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. In either case, the supplied BatchResponse must not be used any more.

func (*BatchResponse) Descriptor

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

func (*BatchResponse) Marshal

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

func (*BatchResponse) MarshalTo

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

func (*BatchResponse) ProtoMessage

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) Reset

func (m *BatchResponse) Reset()

func (*BatchResponse) Size

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

func (*BatchResponse) String

func (br *BatchResponse) String() string

func (*BatchResponse) Unmarshal

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

type BatchResponse_Header

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"`
	// 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"`
	// now is the highest current time from any node contacted during the request.
	// It can be used by the receiver to update its local HLC.
	Now cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=now" json:"now"`
	// collected_spans stores trace spans recorded during the execution of this
	// request.
	CollectedSpans []cockroach_util_tracing.RecordedSpan `protobuf:"bytes,6,rep,name=collected_spans,json=collectedSpans" json:"collected_spans"`
}

func (*BatchResponse_Header) Descriptor

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

func (*BatchResponse_Header) Marshal

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

func (*BatchResponse_Header) MarshalTo

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

func (*BatchResponse_Header) ProtoMessage

func (*BatchResponse_Header) ProtoMessage()

func (*BatchResponse_Header) Reset

func (m *BatchResponse_Header) Reset()

func (*BatchResponse_Header) Size

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

func (*BatchResponse_Header) String

func (m *BatchResponse_Header) String() string

func (*BatchResponse_Header) Unmarshal

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

type BeginTransactionRequest

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

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

func (*BeginTransactionRequest) Equal added in v1.1.0

func (this *BeginTransactionRequest) Equal(that interface{}) bool

func (*BeginTransactionRequest) Marshal

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

func (*BeginTransactionRequest) MarshalTo

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

func (*BeginTransactionRequest) Method

func (*BeginTransactionRequest) Method() Method

Method implements the Request interface.

func (*BeginTransactionRequest) ProtoMessage

func (*BeginTransactionRequest) ProtoMessage()

func (*BeginTransactionRequest) Reset

func (m *BeginTransactionRequest) Reset()

func (*BeginTransactionRequest) ShallowCopy

func (btr *BeginTransactionRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*BeginTransactionRequest) Size

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

func (*BeginTransactionRequest) String

func (m *BeginTransactionRequest) String() string

func (*BeginTransactionRequest) Unmarshal

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

type BeginTransactionResponse

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

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

func (*BeginTransactionResponse) Marshal

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

func (*BeginTransactionResponse) MarshalTo

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

func (*BeginTransactionResponse) ProtoMessage

func (*BeginTransactionResponse) ProtoMessage()

func (*BeginTransactionResponse) Reset

func (m *BeginTransactionResponse) Reset()

func (*BeginTransactionResponse) Size

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

func (*BeginTransactionResponse) String

func (m *BeginTransactionResponse) String() string

func (*BeginTransactionResponse) Unmarshal

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

type BulkOpSummary added in v1.1.0

type BulkOpSummary struct {
	DataSize      int64 `protobuf:"varint,1,opt,name=data_size,json=dataSize" json:"data_size"`
	Rows          int64 `protobuf:"varint,2,opt,name=rows" json:"rows"`
	IndexEntries  int64 `protobuf:"varint,3,opt,name=index_entries,json=indexEntries" json:"index_entries"`
	SystemRecords int64 `protobuf:"varint,4,opt,name=system_records,json=systemRecords" json:"system_records"`
}

func (*BulkOpSummary) Add added in v1.1.0

func (b *BulkOpSummary) Add(other BulkOpSummary)

Add combines the values from other, for use on an accumulator BulkOpSummary.

func (*BulkOpSummary) Descriptor added in v1.1.0

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

func (*BulkOpSummary) Marshal added in v1.1.0

func (m *BulkOpSummary) Marshal() (dAtA []byte, err error)

func (*BulkOpSummary) MarshalTo added in v1.1.0

func (m *BulkOpSummary) MarshalTo(dAtA []byte) (int, error)

func (*BulkOpSummary) ProtoMessage added in v1.1.0

func (*BulkOpSummary) ProtoMessage()

func (*BulkOpSummary) Reset added in v1.1.0

func (m *BulkOpSummary) Reset()

func (*BulkOpSummary) Size added in v1.1.0

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

func (*BulkOpSummary) String added in v1.1.0

func (m *BulkOpSummary) String() string

func (*BulkOpSummary) Unmarshal added in v1.1.0

func (m *BulkOpSummary) Unmarshal(dAtA []byte) error

type CSVOptions added in v1.1.0

type CSVOptions struct {
	// comma is an optional delimiter used by the CSV file; defaults to a comma.
	Comma int32 `protobuf:"varint,1,opt,name=comma" json:"comma"`
	// comment is an optional comment rune; zero value means comments not enabled.
	Comment int32 `protobuf:"varint,2,opt,name=comment" json:"comment"`
	// nullif, if not nil, is the string which identifies a NULL. Can be the empty string.
	Nullif *string `protobuf:"bytes,3,opt,name=nullif" json:"nullif,omitempty"`
}

CSVOptions describe the format of csv data (delimiter, comment, etc).

func (*CSVOptions) Descriptor added in v1.1.0

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

func (*CSVOptions) Marshal added in v1.1.0

func (m *CSVOptions) Marshal() (dAtA []byte, err error)

func (*CSVOptions) MarshalTo added in v1.1.0

func (m *CSVOptions) MarshalTo(dAtA []byte) (int, error)

func (*CSVOptions) ProtoMessage added in v1.1.0

func (*CSVOptions) ProtoMessage()

func (*CSVOptions) Reset added in v1.1.0

func (m *CSVOptions) Reset()

func (*CSVOptions) Size added in v1.1.0

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

func (*CSVOptions) String added in v1.1.0

func (m *CSVOptions) String() string

func (*CSVOptions) Unmarshal added in v1.1.0

func (m *CSVOptions) Unmarshal(dAtA []byte) error

type ChangeReplicasTrigger

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

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

func (*ChangeReplicasTrigger) Equal added in v1.1.0

func (this *ChangeReplicasTrigger) Equal(that interface{}) bool

func (*ChangeReplicasTrigger) Marshal

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

func (*ChangeReplicasTrigger) MarshalTo

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

func (*ChangeReplicasTrigger) ProtoMessage

func (*ChangeReplicasTrigger) ProtoMessage()

func (*ChangeReplicasTrigger) Reset

func (m *ChangeReplicasTrigger) Reset()

func (*ChangeReplicasTrigger) Size

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

func (ChangeReplicasTrigger) String

func (crt ChangeReplicasTrigger) String() string

func (*ChangeReplicasTrigger) Unmarshal

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

type CheckConsistencyRequest

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 storage.CollectChecksum.

func (*CheckConsistencyRequest) Descriptor

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

func (*CheckConsistencyRequest) Equal added in v1.1.0

func (this *CheckConsistencyRequest) Equal(that interface{}) bool

func (*CheckConsistencyRequest) Marshal

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

func (*CheckConsistencyRequest) MarshalTo

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

func (*CheckConsistencyRequest) Method

func (*CheckConsistencyRequest) Method() Method

Method implements the Request interface.

func (*CheckConsistencyRequest) ProtoMessage

func (*CheckConsistencyRequest) ProtoMessage()

func (*CheckConsistencyRequest) Reset

func (m *CheckConsistencyRequest) Reset()

func (*CheckConsistencyRequest) ShallowCopy

func (ccr *CheckConsistencyRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*CheckConsistencyRequest) Size

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

func (*CheckConsistencyRequest) String

func (m *CheckConsistencyRequest) String() string

func (*CheckConsistencyRequest) Unmarshal

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

type CheckConsistencyResponse

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

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

func (*CheckConsistencyResponse) Marshal

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

func (*CheckConsistencyResponse) MarshalTo

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

func (*CheckConsistencyResponse) ProtoMessage

func (*CheckConsistencyResponse) ProtoMessage()

func (*CheckConsistencyResponse) Reset

func (m *CheckConsistencyResponse) Reset()

func (*CheckConsistencyResponse) Size

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

func (*CheckConsistencyResponse) String

func (m *CheckConsistencyResponse) String() string

func (*CheckConsistencyResponse) Unmarshal

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

type CollectedStatementStatistics added in v1.1.0

type CollectedStatementStatistics struct {
	Key   StatementStatisticsKey `protobuf:"bytes,1,opt,name=key" json:"key"`
	Stats StatementStatistics    `protobuf:"bytes,2,opt,name=stats" json:"stats"`
}

CollectedStats wraps collected timings and metadata for some query's execution.

func (*CollectedStatementStatistics) Descriptor added in v1.1.0

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

func (*CollectedStatementStatistics) Marshal added in v1.1.0

func (m *CollectedStatementStatistics) Marshal() (dAtA []byte, err error)

func (*CollectedStatementStatistics) MarshalTo added in v1.1.0

func (m *CollectedStatementStatistics) MarshalTo(dAtA []byte) (int, error)

func (*CollectedStatementStatistics) ProtoMessage added in v1.1.0

func (*CollectedStatementStatistics) ProtoMessage()

func (*CollectedStatementStatistics) Reset added in v1.1.0

func (m *CollectedStatementStatistics) Reset()

func (*CollectedStatementStatistics) Size added in v1.1.0

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

func (*CollectedStatementStatistics) String added in v1.1.0

func (*CollectedStatementStatistics) Unmarshal added in v1.1.0

func (m *CollectedStatementStatistics) Unmarshal(dAtA []byte) error

type ComputeChecksumRequest

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 storage.CollectChecksumRequest with
	// this request.
	ChecksumID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `` /* 137-byte string literal not displayed */
	// 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 retrieved via a storage.CollectChecksumRequest.

func (*ComputeChecksumRequest) Descriptor

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

func (*ComputeChecksumRequest) Equal added in v1.1.0

func (this *ComputeChecksumRequest) Equal(that interface{}) bool

func (*ComputeChecksumRequest) Marshal

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

func (*ComputeChecksumRequest) MarshalTo

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

func (*ComputeChecksumRequest) Method

func (*ComputeChecksumRequest) Method() Method

Method implements the Request interface.

func (*ComputeChecksumRequest) ProtoMessage

func (*ComputeChecksumRequest) ProtoMessage()

func (*ComputeChecksumRequest) Reset

func (m *ComputeChecksumRequest) Reset()

func (*ComputeChecksumRequest) ShallowCopy

func (ccr *ComputeChecksumRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ComputeChecksumRequest) Size

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

func (*ComputeChecksumRequest) String

func (m *ComputeChecksumRequest) String() string

func (*ComputeChecksumRequest) Unmarshal

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

type ComputeChecksumResponse

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

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

func (*ComputeChecksumResponse) Marshal

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

func (*ComputeChecksumResponse) MarshalTo

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

func (*ComputeChecksumResponse) ProtoMessage

func (*ComputeChecksumResponse) ProtoMessage()

func (*ComputeChecksumResponse) Reset

func (m *ComputeChecksumResponse) Reset()

func (*ComputeChecksumResponse) Size

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

func (*ComputeChecksumResponse) String

func (m *ComputeChecksumResponse) String() string

func (*ComputeChecksumResponse) Unmarshal

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

type ConditionFailedError

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

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

func (*ConditionFailedError) Equal added in v1.1.0

func (this *ConditionFailedError) Equal(that interface{}) bool

func (*ConditionFailedError) Error

func (e *ConditionFailedError) Error() string

func (*ConditionFailedError) Marshal

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

func (*ConditionFailedError) MarshalTo

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

func (*ConditionFailedError) ProtoMessage

func (*ConditionFailedError) ProtoMessage()

func (*ConditionFailedError) Reset

func (m *ConditionFailedError) Reset()

func (*ConditionFailedError) Size

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

func (*ConditionFailedError) String

func (m *ConditionFailedError) String() string

func (*ConditionFailedError) Unmarshal

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

type ConditionalPutRequest

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

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

func (*ConditionalPutRequest) Equal added in v1.1.0

func (this *ConditionalPutRequest) Equal(that interface{}) bool

func (*ConditionalPutRequest) Marshal

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

func (*ConditionalPutRequest) MarshalTo

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

func (*ConditionalPutRequest) Method

func (*ConditionalPutRequest) Method() Method

Method implements the Request interface.

func (*ConditionalPutRequest) ProtoMessage

func (*ConditionalPutRequest) ProtoMessage()

func (*ConditionalPutRequest) Reset

func (m *ConditionalPutRequest) Reset()

func (*ConditionalPutRequest) ShallowCopy

func (cpr *ConditionalPutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ConditionalPutRequest) Size

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

func (*ConditionalPutRequest) String

func (m *ConditionalPutRequest) String() string

func (*ConditionalPutRequest) Unmarshal

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

type ConditionalPutResponse

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

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

func (*ConditionalPutResponse) Marshal

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

func (*ConditionalPutResponse) MarshalTo

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

func (*ConditionalPutResponse) ProtoMessage

func (*ConditionalPutResponse) ProtoMessage()

func (*ConditionalPutResponse) Reset

func (m *ConditionalPutResponse) Reset()

func (*ConditionalPutResponse) Size

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

func (*ConditionalPutResponse) String

func (m *ConditionalPutResponse) String() string

func (*ConditionalPutResponse) Unmarshal

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

type DeleteRangeRequest

type DeleteRangeRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// return the keys that are deleted in the response.
	ReturnKeys bool `protobuf:"varint,3,opt,name=return_keys,json=returnKeys" json:"return_keys"`
	// delete "inline" keys which are stored without MVCC timestamps. Note that
	// an "inline" DeleteRange will fail if it attempts to delete any keys which
	// contain timestamped (non-inline) values; this option should only be used on
	// keys which are known to store inline values, such as data in cockroach's
	// time series system.
	//
	// Similarly, attempts to delete keys with inline values will fail unless this
	// flag is set to true; the setting must match the data being deleted.
	//
	// Inline values cannot be deleted transactionally; a DeleteRange with
	// "inline" set to true will fail if it is executed within a transaction.
	Inline bool `protobuf:"varint,4,opt,name=inline" json:"inline"`
}

A DeleteRangeRequest is the argument to the DeleteRange() method. It specifies the range of keys to delete.

func (*DeleteRangeRequest) Descriptor

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

func (*DeleteRangeRequest) Equal added in v1.1.0

func (this *DeleteRangeRequest) Equal(that interface{}) bool

func (*DeleteRangeRequest) Marshal

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

func (*DeleteRangeRequest) MarshalTo

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

func (*DeleteRangeRequest) Method

func (*DeleteRangeRequest) Method() Method

Method implements the Request interface.

func (*DeleteRangeRequest) ProtoMessage

func (*DeleteRangeRequest) ProtoMessage()

func (*DeleteRangeRequest) Reset

func (m *DeleteRangeRequest) Reset()

func (*DeleteRangeRequest) ShallowCopy

func (drr *DeleteRangeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*DeleteRangeRequest) Size

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

func (*DeleteRangeRequest) String

func (m *DeleteRangeRequest) String() string

func (*DeleteRangeRequest) Unmarshal

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

type DeleteRangeResponse

type DeleteRangeResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// All the deleted keys if return_keys is set.
	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

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

func (*DeleteRangeResponse) Marshal

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

func (*DeleteRangeResponse) MarshalTo

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

func (*DeleteRangeResponse) ProtoMessage

func (*DeleteRangeResponse) ProtoMessage()

func (*DeleteRangeResponse) Reset

func (m *DeleteRangeResponse) Reset()

func (*DeleteRangeResponse) Size

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

func (*DeleteRangeResponse) String

func (m *DeleteRangeResponse) String() string

func (*DeleteRangeResponse) Unmarshal

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

type DeleteRequest

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

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

func (*DeleteRequest) Equal added in v1.1.0

func (this *DeleteRequest) Equal(that interface{}) bool

func (*DeleteRequest) Marshal

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

func (*DeleteRequest) MarshalTo

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

func (*DeleteRequest) Method

func (*DeleteRequest) Method() Method

Method implements the Request interface.

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) ShallowCopy

func (dr *DeleteRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*DeleteRequest) Size

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

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) Unmarshal

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

type DeleteResponse

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

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

func (*DeleteResponse) Marshal

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

func (*DeleteResponse) MarshalTo

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

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) Size

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

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

func (*DeleteResponse) Unmarshal

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

type DeprecatedVerifyChecksumRequest

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

func (*DeprecatedVerifyChecksumRequest) Descriptor

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

func (*DeprecatedVerifyChecksumRequest) Equal added in v1.1.0

func (this *DeprecatedVerifyChecksumRequest) Equal(that interface{}) bool

func (*DeprecatedVerifyChecksumRequest) Marshal

func (m *DeprecatedVerifyChecksumRequest) Marshal() (dAtA []byte, err error)

func (*DeprecatedVerifyChecksumRequest) MarshalTo

func (m *DeprecatedVerifyChecksumRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeprecatedVerifyChecksumRequest) Method

Method implements the Request interface.

func (*DeprecatedVerifyChecksumRequest) ProtoMessage

func (*DeprecatedVerifyChecksumRequest) ProtoMessage()

func (*DeprecatedVerifyChecksumRequest) Reset

func (*DeprecatedVerifyChecksumRequest) ShallowCopy

func (dvcr *DeprecatedVerifyChecksumRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*DeprecatedVerifyChecksumRequest) Size

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

func (*DeprecatedVerifyChecksumRequest) String

func (*DeprecatedVerifyChecksumRequest) Unmarshal

func (m *DeprecatedVerifyChecksumRequest) Unmarshal(dAtA []byte) error

type DeprecatedVerifyChecksumResponse

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

func (*DeprecatedVerifyChecksumResponse) Descriptor

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

func (*DeprecatedVerifyChecksumResponse) Marshal

func (m *DeprecatedVerifyChecksumResponse) Marshal() (dAtA []byte, err error)

func (*DeprecatedVerifyChecksumResponse) MarshalTo

func (m *DeprecatedVerifyChecksumResponse) MarshalTo(dAtA []byte) (int, error)

func (*DeprecatedVerifyChecksumResponse) ProtoMessage

func (*DeprecatedVerifyChecksumResponse) ProtoMessage()

func (*DeprecatedVerifyChecksumResponse) Reset

func (*DeprecatedVerifyChecksumResponse) Size

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

func (*DeprecatedVerifyChecksumResponse) String

func (*DeprecatedVerifyChecksumResponse) Unmarshal

func (m *DeprecatedVerifyChecksumResponse) Unmarshal(dAtA []byte) error

type EndTransactionRequest

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"`
	// If set, deadline represents the maximum timestamp at which the transaction
	// can commit (i.e. the maximum timestamp for the txn's writes). If
	// EndTransaction(Commit=true) finds that the txn's timestamp has been pushed
	// above this deadline, an error will be returned and the client is supposed
	// to rollback the txn.
	// N.B. Assuming that the deadline was valid to begin with (i.e. it was higher
	// than the txn's OrigTimestamp), only Snapshot transactions can get in
	// trouble with the deadline check. A Serializable txn that has had its
	// timestamp pushed has already lost before the deadline check: it will be
	// forced to restart.
	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"`
	// Requires that the transaction completes as a 1 phase commit. This
	// guarantees that all writes are to the same range and that no
	// intents are left in the event of an error.
	Require1PC bool `protobuf:"varint,6,opt,name=require_1pc,json=require1pc" json:"require_1pc"`
}

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

func (*EndTransactionRequest) Descriptor

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

func (*EndTransactionRequest) Equal added in v1.1.0

func (this *EndTransactionRequest) Equal(that interface{}) bool

func (*EndTransactionRequest) Marshal

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

func (*EndTransactionRequest) MarshalTo

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

func (*EndTransactionRequest) Method

func (*EndTransactionRequest) Method() Method

Method implements the Request interface.

func (*EndTransactionRequest) ProtoMessage

func (*EndTransactionRequest) ProtoMessage()

func (*EndTransactionRequest) Reset

func (m *EndTransactionRequest) Reset()

func (*EndTransactionRequest) ShallowCopy

func (etr *EndTransactionRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*EndTransactionRequest) Size

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

func (*EndTransactionRequest) String

func (m *EndTransactionRequest) String() string

func (*EndTransactionRequest) Unmarshal

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

type EndTransactionResponse

type EndTransactionResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// 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.

func (*EndTransactionResponse) Descriptor

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

func (*EndTransactionResponse) Marshal

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

func (*EndTransactionResponse) MarshalTo

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

func (*EndTransactionResponse) ProtoMessage

func (*EndTransactionResponse) ProtoMessage()

func (*EndTransactionResponse) Reset

func (m *EndTransactionResponse) Reset()

func (*EndTransactionResponse) Size

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

func (*EndTransactionResponse) String

func (m *EndTransactionResponse) String() string

func (*EndTransactionResponse) Unmarshal

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

type ErrPosition

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

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

func (*ErrPosition) Equal added in v1.1.0

func (this *ErrPosition) Equal(that interface{}) bool

func (*ErrPosition) Marshal

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

func (*ErrPosition) MarshalTo

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

func (*ErrPosition) ProtoMessage

func (*ErrPosition) ProtoMessage()

func (*ErrPosition) Reset

func (m *ErrPosition) Reset()

func (*ErrPosition) Size

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

func (*ErrPosition) String

func (m *ErrPosition) String() string

func (*ErrPosition) Unmarshal

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

type Error

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.
	TransactionRestart TransactionRestart `` /* 141-byte string literal not displayed */
	// An optional updated transaction. This is to be used by the client in case
	// of retryable errors.
	//
	// Not to be accessed directly - use Error.GetTxn().
	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

func NewError(err error) *Error

NewError creates an Error from the given error.

func NewErrorWithTxn

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

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

txn is cloned before being stored in Error.

func NewErrorf

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

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

func (*Error) Equal added in v1.1.0

func (this *Error) Equal(that interface{}) bool

func (*Error) GetDetail

func (e *Error) GetDetail() ErrorDetailInterface

GetDetail returns an error detail associated with the error.

func (*Error) GetTxn

func (e *Error) GetTxn() *Transaction

GetTxn returns the txn.

func (*Error) GoError

func (e *Error) GoError() error

GoError returns a Go error converted from Error.

func (*Error) Marshal

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

func (*Error) MarshalTo

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

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) SetErrorIndex

func (e *Error) SetErrorIndex(index int32)

SetErrorIndex sets the index of the error.

func (*Error) SetTxn

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

SetTxn sets the txn and resets the error message. txn is cloned before being stored in the Error. TODO(kaneda): Unexpose this method and make callers use NewErrorWithTxn.

func (*Error) Size

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

func (*Error) String

func (e *Error) String() string

String implements fmt.Stringer.

func (*Error) Unmarshal

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

func (*Error) UpdateTxn

func (e *Error) UpdateTxn(o *Transaction)

UpdateTxn updates the txn.

type ErrorDetail

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 `` /* 145-byte string literal not displayed */
	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"`
	// TODO(kaneda): Following three 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"`
	ReplicaTooOld     *ReplicaTooOldError     `protobuf:"bytes,18,opt,name=replica_too_old,json=replicaTooOld" json:"replica_too_old,omitempty"`
	AmbiguousResult   *AmbiguousResultError   `protobuf:"bytes,26,opt,name=ambiguous_result,json=ambiguousResult" json:"ambiguous_result,omitempty"`
	StoreNotFound     *StoreNotFoundError     `protobuf:"bytes,27,opt,name=store_not_found,json=storeNotFound" json:"store_not_found,omitempty"`
	// The following three are ErrorDetails (and proto messages) because they
	// needs to be communicated from the TxnCoordSender and Txn to the upper
	// layers through the Sender interface.
	HandledRetryableTxnError *HandledRetryableTxnError `` /* 131-byte string literal not displayed */
	UntrackedTxnError        *UntrackedTxnError        `protobuf:"bytes,29,opt,name=untracked_txn_error,json=untrackedTxnError" json:"untracked_txn_error,omitempty"`
	TxnAbortedAsyncErr       *TxnPrevAttemptError      `protobuf:"bytes,30,opt,name=txn_aborted_async_err,json=txnAbortedAsyncErr" json:"txn_aborted_async_err,omitempty"`
}

ErrorDetail is a union type containing all available errors.

func (*ErrorDetail) Descriptor

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

func (*ErrorDetail) Equal added in v1.1.0

func (this *ErrorDetail) Equal(that interface{}) bool

func (*ErrorDetail) GetValue

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

func (*ErrorDetail) Marshal

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

func (*ErrorDetail) MarshalTo

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

func (*ErrorDetail) ProtoMessage

func (*ErrorDetail) ProtoMessage()

func (*ErrorDetail) Reset

func (m *ErrorDetail) Reset()

func (*ErrorDetail) SetValue

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

func (*ErrorDetail) Size

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

func (*ErrorDetail) String

func (m *ErrorDetail) String() string

func (*ErrorDetail) Unmarshal

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

type ErrorDetailInterface

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

ErrorDetailInterface is an interface for each error detail.

type ExportRequest

type ExportRequest struct {
	Span      `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Storage   ExportStorage                `protobuf:"bytes,2,opt,name=storage" json:"storage"`
	StartTime cockroach_util_hlc.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime" json:"start_time"`
}

ExportRequest is the argument to the Export() method, to dump a keyrange into files under a basepath.

func (*ExportRequest) Descriptor

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

func (*ExportRequest) Equal added in v1.1.0

func (this *ExportRequest) Equal(that interface{}) bool

func (*ExportRequest) Marshal

func (m *ExportRequest) Marshal() (dAtA []byte, err error)

func (*ExportRequest) MarshalTo

func (m *ExportRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExportRequest) Method

func (*ExportRequest) Method() Method

Method implements the Request interface.

func (*ExportRequest) ProtoMessage

func (*ExportRequest) ProtoMessage()

func (*ExportRequest) Reset

func (m *ExportRequest) Reset()

func (*ExportRequest) ShallowCopy

func (ekr *ExportRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ExportRequest) Size

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

func (*ExportRequest) String

func (m *ExportRequest) String() string

func (*ExportRequest) Unmarshal

func (m *ExportRequest) Unmarshal(dAtA []byte) error

type ExportResponse

type ExportResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Files          []ExportResponse_File `protobuf:"bytes,2,rep,name=files" json:"files"`
}

ExportResponse is the response to an Export() operation.

func (*ExportResponse) Descriptor

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

func (*ExportResponse) Marshal

func (m *ExportResponse) Marshal() (dAtA []byte, err error)

func (*ExportResponse) MarshalTo

func (m *ExportResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExportResponse) ProtoMessage

func (*ExportResponse) ProtoMessage()

func (*ExportResponse) Reset

func (m *ExportResponse) Reset()

func (*ExportResponse) Size

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

func (*ExportResponse) String

func (m *ExportResponse) String() string

func (*ExportResponse) Unmarshal

func (m *ExportResponse) Unmarshal(dAtA []byte) error

type ExportResponse_File

type ExportResponse_File struct {
	Span     Span          `protobuf:"bytes,1,opt,name=span" json:"span"`
	Path     string        `protobuf:"bytes,2,opt,name=path" json:"path"`
	Sha512   []byte        `protobuf:"bytes,5,opt,name=sha512" json:"sha512,omitempty"`
	Exported BulkOpSummary `protobuf:"bytes,6,opt,name=exported" json:"exported"`
}

File describes a keyrange that has been dumped to a file at the given path.

func (*ExportResponse_File) Descriptor

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

func (*ExportResponse_File) Marshal

func (m *ExportResponse_File) Marshal() (dAtA []byte, err error)

func (*ExportResponse_File) MarshalTo

func (m *ExportResponse_File) MarshalTo(dAtA []byte) (int, error)

func (*ExportResponse_File) ProtoMessage

func (*ExportResponse_File) ProtoMessage()

func (*ExportResponse_File) Reset

func (m *ExportResponse_File) Reset()

func (*ExportResponse_File) Size

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

func (*ExportResponse_File) String

func (m *ExportResponse_File) String() string

func (*ExportResponse_File) Unmarshal

func (m *ExportResponse_File) Unmarshal(dAtA []byte) error

type ExportStorage

type ExportStorage struct {
	Provider          ExportStorageProvider       `protobuf:"varint,1,opt,name=provider,enum=cockroach.roachpb.ExportStorageProvider" json:"provider"`
	LocalFile         ExportStorage_LocalFilePath `protobuf:"bytes,2,opt,name=LocalFile" json:"LocalFile"`
	HttpPath          ExportStorage_Http          `protobuf:"bytes,3,opt,name=HttpPath" json:"HttpPath"`
	GoogleCloudConfig *ExportStorage_GCS          `protobuf:"bytes,4,opt,name=GoogleCloudConfig" json:"GoogleCloudConfig,omitempty"`
	S3Config          *ExportStorage_S3           `protobuf:"bytes,5,opt,name=S3Config" json:"S3Config,omitempty"`
	AzureConfig       *ExportStorage_Azure        `protobuf:"bytes,6,opt,name=AzureConfig" json:"AzureConfig,omitempty"`
}

func (*ExportStorage) Descriptor

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

func (*ExportStorage) Equal added in v1.1.0

func (this *ExportStorage) Equal(that interface{}) bool

func (*ExportStorage) Marshal

func (m *ExportStorage) Marshal() (dAtA []byte, err error)

func (*ExportStorage) MarshalTo

func (m *ExportStorage) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage) ProtoMessage

func (*ExportStorage) ProtoMessage()

func (*ExportStorage) Reset

func (m *ExportStorage) Reset()

func (*ExportStorage) Size

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

func (*ExportStorage) String

func (m *ExportStorage) String() string

func (*ExportStorage) Unmarshal

func (m *ExportStorage) Unmarshal(dAtA []byte) error

type ExportStorageProvider

type ExportStorageProvider int32
const (
	ExportStorageProvider_Unknown     ExportStorageProvider = 0
	ExportStorageProvider_LocalFile   ExportStorageProvider = 1
	ExportStorageProvider_Http        ExportStorageProvider = 2
	ExportStorageProvider_S3          ExportStorageProvider = 3
	ExportStorageProvider_GoogleCloud ExportStorageProvider = 4
	ExportStorageProvider_Azure       ExportStorageProvider = 5
)

func (ExportStorageProvider) Enum

func (ExportStorageProvider) EnumDescriptor

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

func (ExportStorageProvider) String

func (x ExportStorageProvider) String() string

func (*ExportStorageProvider) UnmarshalJSON

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

type ExportStorage_Azure

type ExportStorage_Azure struct {
	Container   string `protobuf:"bytes,1,opt,name=container" json:"container"`
	Prefix      string `protobuf:"bytes,2,opt,name=prefix" json:"prefix"`
	AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName" json:"account_name"`
	AccountKey  string `protobuf:"bytes,4,opt,name=account_key,json=accountKey" json:"account_key"`
}

func (*ExportStorage_Azure) Descriptor

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

func (*ExportStorage_Azure) Equal added in v1.1.0

func (this *ExportStorage_Azure) Equal(that interface{}) bool

func (*ExportStorage_Azure) Marshal

func (m *ExportStorage_Azure) Marshal() (dAtA []byte, err error)

func (*ExportStorage_Azure) MarshalTo

func (m *ExportStorage_Azure) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage_Azure) ProtoMessage

func (*ExportStorage_Azure) ProtoMessage()

func (*ExportStorage_Azure) Reset

func (m *ExportStorage_Azure) Reset()

func (*ExportStorage_Azure) Size

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

func (*ExportStorage_Azure) String

func (m *ExportStorage_Azure) String() string

func (*ExportStorage_Azure) Unmarshal

func (m *ExportStorage_Azure) Unmarshal(dAtA []byte) error

type ExportStorage_GCS

type ExportStorage_GCS struct {
	Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket"`
	Prefix string `protobuf:"bytes,2,opt,name=prefix" json:"prefix"`
}

func (*ExportStorage_GCS) Descriptor

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

func (*ExportStorage_GCS) Equal added in v1.1.0

func (this *ExportStorage_GCS) Equal(that interface{}) bool

func (*ExportStorage_GCS) Marshal

func (m *ExportStorage_GCS) Marshal() (dAtA []byte, err error)

func (*ExportStorage_GCS) MarshalTo

func (m *ExportStorage_GCS) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage_GCS) ProtoMessage

func (*ExportStorage_GCS) ProtoMessage()

func (*ExportStorage_GCS) Reset

func (m *ExportStorage_GCS) Reset()

func (*ExportStorage_GCS) Size

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

func (*ExportStorage_GCS) String

func (m *ExportStorage_GCS) String() string

func (*ExportStorage_GCS) Unmarshal

func (m *ExportStorage_GCS) Unmarshal(dAtA []byte) error

type ExportStorage_Http

type ExportStorage_Http struct {
	BaseUri string `protobuf:"bytes,1,opt,name=baseUri" json:"baseUri"`
}

func (*ExportStorage_Http) Descriptor

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

func (*ExportStorage_Http) Equal added in v1.1.0

func (this *ExportStorage_Http) Equal(that interface{}) bool

func (*ExportStorage_Http) Marshal

func (m *ExportStorage_Http) Marshal() (dAtA []byte, err error)

func (*ExportStorage_Http) MarshalTo

func (m *ExportStorage_Http) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage_Http) ProtoMessage

func (*ExportStorage_Http) ProtoMessage()

func (*ExportStorage_Http) Reset

func (m *ExportStorage_Http) Reset()

func (*ExportStorage_Http) Size

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

func (*ExportStorage_Http) String

func (m *ExportStorage_Http) String() string

func (*ExportStorage_Http) Unmarshal

func (m *ExportStorage_Http) Unmarshal(dAtA []byte) error

type ExportStorage_LocalFilePath

type ExportStorage_LocalFilePath struct {
	Path string `protobuf:"bytes,1,opt,name=path" json:"path"`
}

func (*ExportStorage_LocalFilePath) Descriptor

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

func (*ExportStorage_LocalFilePath) Equal added in v1.1.0

func (this *ExportStorage_LocalFilePath) Equal(that interface{}) bool

func (*ExportStorage_LocalFilePath) Marshal

func (m *ExportStorage_LocalFilePath) Marshal() (dAtA []byte, err error)

func (*ExportStorage_LocalFilePath) MarshalTo

func (m *ExportStorage_LocalFilePath) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage_LocalFilePath) ProtoMessage

func (*ExportStorage_LocalFilePath) ProtoMessage()

func (*ExportStorage_LocalFilePath) Reset

func (m *ExportStorage_LocalFilePath) Reset()

func (*ExportStorage_LocalFilePath) Size

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

func (*ExportStorage_LocalFilePath) String

func (m *ExportStorage_LocalFilePath) String() string

func (*ExportStorage_LocalFilePath) Unmarshal

func (m *ExportStorage_LocalFilePath) Unmarshal(dAtA []byte) error

type ExportStorage_S3

type ExportStorage_S3 struct {
	Bucket    string `protobuf:"bytes,1,opt,name=bucket" json:"bucket"`
	Prefix    string `protobuf:"bytes,2,opt,name=prefix" json:"prefix"`
	AccessKey string `protobuf:"bytes,3,opt,name=access_key,json=accessKey" json:"access_key"`
	Secret    string `protobuf:"bytes,4,opt,name=secret" json:"secret"`
	TempToken string `protobuf:"bytes,5,opt,name=temp_token,json=tempToken" json:"temp_token"`
}

func (*ExportStorage_S3) Descriptor

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

func (*ExportStorage_S3) Equal added in v1.1.0

func (this *ExportStorage_S3) Equal(that interface{}) bool

func (*ExportStorage_S3) Keys

func (b *ExportStorage_S3) Keys() *aws.Config

Keys returns credentials in an aws.Config.

func (*ExportStorage_S3) Marshal

func (m *ExportStorage_S3) Marshal() (dAtA []byte, err error)

func (*ExportStorage_S3) MarshalTo

func (m *ExportStorage_S3) MarshalTo(dAtA []byte) (int, error)

func (*ExportStorage_S3) ProtoMessage

func (*ExportStorage_S3) ProtoMessage()

func (*ExportStorage_S3) Reset

func (m *ExportStorage_S3) Reset()

func (*ExportStorage_S3) Size

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

func (*ExportStorage_S3) String

func (m *ExportStorage_S3) String() string

func (*ExportStorage_S3) Unmarshal

func (m *ExportStorage_S3) Unmarshal(dAtA []byte) error

type ExternalClient

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

func NewExternalClient

func NewExternalClient(cc *grpc.ClientConn) ExternalClient

type ExternalServer

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

type GCRequest

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"`
	// TxnSpanGCThreshold is the timestamp below which inactive transactions were
	// considered for GC (and thus might have been removed).
	TxnSpanGCThreshold cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=txn_span_gc_threshold,json=txnSpanGcThreshold" json:"txn_span_gc_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

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

func (*GCRequest) Equal added in v1.1.0

func (this *GCRequest) Equal(that interface{}) bool

func (*GCRequest) Marshal

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

func (*GCRequest) MarshalTo

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

func (*GCRequest) Method

func (*GCRequest) Method() Method

Method implements the Request interface.

func (*GCRequest) ProtoMessage

func (*GCRequest) ProtoMessage()

func (*GCRequest) Reset

func (m *GCRequest) Reset()

func (*GCRequest) ShallowCopy

func (gcr *GCRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*GCRequest) Size

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

func (*GCRequest) String

func (m *GCRequest) String() string

func (*GCRequest) Unmarshal

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

type GCRequest_GCKey

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

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

func (*GCRequest_GCKey) Equal added in v1.1.0

func (this *GCRequest_GCKey) Equal(that interface{}) bool

func (*GCRequest_GCKey) Marshal

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

func (*GCRequest_GCKey) MarshalTo

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

func (*GCRequest_GCKey) ProtoMessage

func (*GCRequest_GCKey) ProtoMessage()

func (*GCRequest_GCKey) Reset

func (m *GCRequest_GCKey) Reset()

func (*GCRequest_GCKey) Size

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

func (*GCRequest_GCKey) String

func (m *GCRequest_GCKey) String() string

func (*GCRequest_GCKey) Unmarshal

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

type GCResponse

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

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

func (*GCResponse) Marshal

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

func (*GCResponse) MarshalTo

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

func (*GCResponse) ProtoMessage

func (*GCResponse) ProtoMessage()

func (*GCResponse) Reset

func (m *GCResponse) Reset()

func (*GCResponse) Size

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

func (*GCResponse) String

func (m *GCResponse) String() string

func (*GCResponse) Unmarshal

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

type GetRequest

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

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

func (*GetRequest) Equal added in v1.1.0

func (this *GetRequest) Equal(that interface{}) bool

func (*GetRequest) Marshal

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

func (*GetRequest) MarshalTo

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

func (*GetRequest) Method

func (*GetRequest) Method() Method

Method implements the Request interface.

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) ShallowCopy

func (gr *GetRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*GetRequest) Size

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

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

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

type GetResponse

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

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

func (*GetResponse) Marshal

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

func (*GetResponse) MarshalTo

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

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) Size

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

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal

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

func (*GetResponse) Verify

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

Verify verifies the integrity of the get response value.

type HandledRetryableTxnError

type HandledRetryableTxnError struct {
	// A user-readable message.
	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg"`
	// The ID of the transaction being restarted. The client is supposed to check
	// this against the ID of its transaction and make sure the retryable error
	// is meant for its level and didn't escape from some inner transaction.
	TxnID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,2,opt,name=txn_id,json=txnId,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"txn_id"`
	// The Transaction that should be used by next attempts. Depending on the
	// original cause of this method, this can either be the same Transaction as
	// before, but with an incremented epoch and timestamp, or a completely new
	// Transaction.
	Transaction Transaction `protobuf:"bytes,3,opt,name=transaction" json:"transaction"`
}

HandledRetryableTxnError is an error detail representing a retryable error that has been "handled" by the TxnCoordSender. This error is produced by the TxnCoordSender and is only produced for transactional requests.

It contains the final form of the Transaction proto that should be used on next attempts. After being produced by the TxnCoordSender, this error is handled first by the client.Txn, which uses the Transaction inside to update its state, and then passed along to SQL in a pErr (through the client.Sender() interface).

func NewHandledRetryableTxnError

func NewHandledRetryableTxnError(
	msg string, txnID uuid.UUID, txn Transaction,
) *HandledRetryableTxnError

NewHandledRetryableTxnError initializes a new HandledRetryableTxnError.

txnID is the ID of the transaction being restarted. txn is the transaction that the client should use for the next attempts.

func (*HandledRetryableTxnError) Descriptor

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

func (*HandledRetryableTxnError) Equal added in v1.1.0

func (this *HandledRetryableTxnError) Equal(that interface{}) bool

func (*HandledRetryableTxnError) Error

func (e *HandledRetryableTxnError) Error() string

func (*HandledRetryableTxnError) Marshal

func (m *HandledRetryableTxnError) Marshal() (dAtA []byte, err error)

func (*HandledRetryableTxnError) MarshalTo

func (m *HandledRetryableTxnError) MarshalTo(dAtA []byte) (int, error)

func (*HandledRetryableTxnError) ProtoMessage

func (*HandledRetryableTxnError) ProtoMessage()

func (*HandledRetryableTxnError) Reset

func (m *HandledRetryableTxnError) Reset()

func (*HandledRetryableTxnError) Size

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

func (*HandledRetryableTxnError) String

func (m *HandledRetryableTxnError) String() string

func (*HandledRetryableTxnError) Unmarshal

func (m *HandledRetryableTxnError) Unmarshal(dAtA []byte) error
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 `` /* 133-byte string literal not displayed */
	// If set to a non-zero value, it limits the total number of keys touched
	// by span requests in the batch. Span requests are requests like
	// Scan, ReverseScan, and DelRange. If two requests touch the
	// same key it is double counted.
	//
	// If a batch limit is used with Scan requests, the spans for the requests
	// must be non-overlapping and in increasing order.
	//
	// If a batch limit is used with ReverseScan requests, the spans for the
	// requests must be non-overlapping and in decreasing order.
	MaxSpanRequestKeys int64 `protobuf:"varint,8,opt,name=max_span_request_keys,json=maxSpanRequestKeys" json:"max_span_request_keys"`
	// 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"`
	// If set, return_range_info causes RangeInfo details to be returned with
	// each ResponseHeader.
	ReturnRangeInfo bool `protobuf:"varint,10,opt,name=return_range_info,json=returnRangeInfo" json:"return_range_info"`
	// gateway_node_id is the ID of the gateway node where the request originated.
	GatewayNodeID NodeID `protobuf:"varint,11,opt,name=gateway_node_id,json=gatewayNodeId,casttype=NodeID" json:"gateway_node_id"`
}

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

func (*Header) Descriptor

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

func (*Header) Marshal

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

func (*Header) MarshalTo

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

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

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

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

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

type HeartbeatTxnRequest

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

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

func (*HeartbeatTxnRequest) Equal added in v1.1.0

func (this *HeartbeatTxnRequest) Equal(that interface{}) bool

func (*HeartbeatTxnRequest) Marshal

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

func (*HeartbeatTxnRequest) MarshalTo

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

func (*HeartbeatTxnRequest) Method

func (*HeartbeatTxnRequest) Method() Method

Method implements the Request interface.

func (*HeartbeatTxnRequest) ProtoMessage

func (*HeartbeatTxnRequest) ProtoMessage()

func (*HeartbeatTxnRequest) Reset

func (m *HeartbeatTxnRequest) Reset()

func (*HeartbeatTxnRequest) ShallowCopy

func (htr *HeartbeatTxnRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*HeartbeatTxnRequest) Size

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

func (*HeartbeatTxnRequest) String

func (m *HeartbeatTxnRequest) String() string

func (*HeartbeatTxnRequest) Unmarshal

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

type HeartbeatTxnResponse

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

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

func (*HeartbeatTxnResponse) Marshal

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

func (*HeartbeatTxnResponse) MarshalTo

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

func (*HeartbeatTxnResponse) ProtoMessage

func (*HeartbeatTxnResponse) ProtoMessage()

func (*HeartbeatTxnResponse) Reset

func (m *HeartbeatTxnResponse) Reset()

func (*HeartbeatTxnResponse) Size

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

func (*HeartbeatTxnResponse) String

func (m *HeartbeatTxnResponse) String() string

func (*HeartbeatTxnResponse) Unmarshal

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

type ImportRequest

type ImportRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Files contains an ordered list of files, each containing kv entries to
	// import. Entries in later files with the same key override earlier ones.
	Files []ImportRequest_File `protobuf:"bytes,2,rep,name=files" json:"files"`
	// DataSpan is the pre-rewrite keyrange of the data in `Files`.
	DataSpan Span `protobuf:"bytes,3,opt,name=data_span,json=dataSpan" json:"data_span"`
	// Rekeys contains the descriptors for the data being Imported and the
	// previous ID for each (which is the ID used in the source data pointed to by
	// `files`).
	// TODO(dan): This field is a superset of the information represented by
	// `key_rewrites` and will supercede it once rekeying of interleaved tables is
	// fixed.
	Rekeys []ImportRequest_TableRekey `protobuf:"bytes,5,rep,name=rekeys" json:"rekeys"`
}

ImportRequest is the argument to the Import() method, to bulk load key/value entries.

func (*ImportRequest) Descriptor

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

func (*ImportRequest) Equal added in v1.1.0

func (this *ImportRequest) Equal(that interface{}) bool

func (*ImportRequest) Marshal

func (m *ImportRequest) Marshal() (dAtA []byte, err error)

func (*ImportRequest) MarshalTo

func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error)

func (*ImportRequest) Method

func (*ImportRequest) Method() Method

Method implements the Request interface.

func (*ImportRequest) ProtoMessage

func (*ImportRequest) ProtoMessage()

func (*ImportRequest) Reset

func (m *ImportRequest) Reset()

func (*ImportRequest) ShallowCopy

func (r *ImportRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ImportRequest) Size

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

func (*ImportRequest) String

func (m *ImportRequest) String() string

func (*ImportRequest) Unmarshal

func (m *ImportRequest) Unmarshal(dAtA []byte) error

type ImportRequest_File

type ImportRequest_File struct {
	Dir    ExportStorage `protobuf:"bytes,1,opt,name=dir" json:"dir"`
	Path   string        `protobuf:"bytes,2,opt,name=path" json:"path"`
	Sha512 []byte        `protobuf:"bytes,4,opt,name=sha512" json:"sha512,omitempty"`
}

func (*ImportRequest_File) Descriptor

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

func (*ImportRequest_File) Equal added in v1.1.0

func (this *ImportRequest_File) Equal(that interface{}) bool

func (*ImportRequest_File) Marshal

func (m *ImportRequest_File) Marshal() (dAtA []byte, err error)

func (*ImportRequest_File) MarshalTo

func (m *ImportRequest_File) MarshalTo(dAtA []byte) (int, error)

func (*ImportRequest_File) ProtoMessage

func (*ImportRequest_File) ProtoMessage()

func (*ImportRequest_File) Reset

func (m *ImportRequest_File) Reset()

func (*ImportRequest_File) Size

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

func (*ImportRequest_File) String

func (m *ImportRequest_File) String() string

func (*ImportRequest_File) Unmarshal

func (m *ImportRequest_File) Unmarshal(dAtA []byte) error

type ImportRequest_TableRekey

type ImportRequest_TableRekey struct {
	// OldID is the previous ID of `new_desc`.
	OldID uint32 `protobuf:"varint,1,opt,name=old_id,json=oldId" json:"old_id"`
	// NewDesc is an encoded Descriptor message.
	NewDesc []byte `protobuf:"bytes,2,opt,name=new_desc,json=newDesc" json:"new_desc,omitempty"`
}

func (*ImportRequest_TableRekey) Descriptor

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

func (*ImportRequest_TableRekey) Equal added in v1.1.0

func (this *ImportRequest_TableRekey) Equal(that interface{}) bool

func (*ImportRequest_TableRekey) Marshal

func (m *ImportRequest_TableRekey) Marshal() (dAtA []byte, err error)

func (*ImportRequest_TableRekey) MarshalTo

func (m *ImportRequest_TableRekey) MarshalTo(dAtA []byte) (int, error)

func (*ImportRequest_TableRekey) ProtoMessage

func (*ImportRequest_TableRekey) ProtoMessage()

func (*ImportRequest_TableRekey) Reset

func (m *ImportRequest_TableRekey) Reset()

func (*ImportRequest_TableRekey) Size

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

func (*ImportRequest_TableRekey) String

func (m *ImportRequest_TableRekey) String() string

func (*ImportRequest_TableRekey) Unmarshal

func (m *ImportRequest_TableRekey) Unmarshal(dAtA []byte) error

type ImportResponse

type ImportResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Imported       BulkOpSummary `protobuf:"bytes,3,opt,name=imported" json:"imported"`
}

ImportResponse is the response to a Import() operation.

func (*ImportResponse) Descriptor

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

func (*ImportResponse) Marshal

func (m *ImportResponse) Marshal() (dAtA []byte, err error)

func (*ImportResponse) MarshalTo

func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error)

func (*ImportResponse) ProtoMessage

func (*ImportResponse) ProtoMessage()

func (*ImportResponse) Reset

func (m *ImportResponse) Reset()

func (*ImportResponse) Size

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

func (*ImportResponse) String

func (m *ImportResponse) String() string

func (*ImportResponse) Unmarshal

func (m *ImportResponse) Unmarshal(dAtA []byte) error

type IncrementRequest

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

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

func (*IncrementRequest) Equal added in v1.1.0

func (this *IncrementRequest) Equal(that interface{}) bool

func (*IncrementRequest) Marshal

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

func (*IncrementRequest) MarshalTo

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

func (*IncrementRequest) Method

func (*IncrementRequest) Method() Method

Method implements the Request interface.

func (*IncrementRequest) ProtoMessage

func (*IncrementRequest) ProtoMessage()

func (*IncrementRequest) Reset

func (m *IncrementRequest) Reset()

func (*IncrementRequest) ShallowCopy

func (ir *IncrementRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*IncrementRequest) Size

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

func (*IncrementRequest) String

func (m *IncrementRequest) String() string

func (*IncrementRequest) Unmarshal

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

type IncrementResponse

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

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

func (*IncrementResponse) Marshal

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

func (*IncrementResponse) MarshalTo

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

func (*IncrementResponse) ProtoMessage

func (*IncrementResponse) ProtoMessage()

func (*IncrementResponse) Reset

func (m *IncrementResponse) Reset()

func (*IncrementResponse) Size

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

func (*IncrementResponse) String

func (m *IncrementResponse) String() string

func (*IncrementResponse) Unmarshal

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

type InitPutRequest

type InitPutRequest struct {
	Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Value Value `protobuf:"bytes,2,opt,name=value" json:"value"`
	// 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,3,opt,name=blind" json:"blind"`
	// If true, tombstones cause ConditionFailedErrors.
	FailOnTombstones bool `protobuf:"varint,4,opt,name=failOnTombstones" json:"failOnTombstones"`
}

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

  • If key doesn't exist, sets value.
  • If key exists, returns a ConditionFailedError if value != existing value If failOnTombstones is set to true, tombstone values count as mismatched values and will cause a ConditionFailedError.

func (*InitPutRequest) Descriptor

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

func (*InitPutRequest) Equal added in v1.1.0

func (this *InitPutRequest) Equal(that interface{}) bool

func (*InitPutRequest) Marshal

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

func (*InitPutRequest) MarshalTo

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

func (*InitPutRequest) Method

func (*InitPutRequest) Method() Method

Method implements the Request interface.

func (*InitPutRequest) ProtoMessage

func (*InitPutRequest) ProtoMessage()

func (*InitPutRequest) Reset

func (m *InitPutRequest) Reset()

func (*InitPutRequest) ShallowCopy

func (pr *InitPutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*InitPutRequest) Size

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

func (*InitPutRequest) String

func (m *InitPutRequest) String() string

func (*InitPutRequest) Unmarshal

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

type InitPutResponse

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

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

func (*InitPutResponse) Marshal

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

func (*InitPutResponse) MarshalTo

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

func (*InitPutResponse) ProtoMessage

func (*InitPutResponse) ProtoMessage()

func (*InitPutResponse) Reset

func (m *InitPutResponse) Reset()

func (*InitPutResponse) Size

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

func (*InitPutResponse) String

func (m *InitPutResponse) String() string

func (*InitPutResponse) Unmarshal

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

type Intent

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 AsIntents

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 (*Intent) Descriptor

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

func (*Intent) Equal added in v1.1.0

func (this *Intent) Equal(that interface{}) bool

func (*Intent) Marshal

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

func (*Intent) MarshalTo

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

func (*Intent) ProtoMessage

func (*Intent) ProtoMessage()

func (*Intent) Reset

func (m *Intent) Reset()

func (*Intent) Size

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

func (*Intent) String

func (m *Intent) String() string

func (*Intent) Unmarshal

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

type InternalClient

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

func NewInternalClient

func NewInternalClient(cc *grpc.ClientConn) InternalClient

type InternalCommitTrigger

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

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

func (*InternalCommitTrigger) Equal added in v1.1.0

func (this *InternalCommitTrigger) Equal(that interface{}) bool

func (*InternalCommitTrigger) GetChangeReplicasTrigger

func (m *InternalCommitTrigger) GetChangeReplicasTrigger() *ChangeReplicasTrigger

func (*InternalCommitTrigger) GetMergeTrigger

func (m *InternalCommitTrigger) GetMergeTrigger() *MergeTrigger

func (*InternalCommitTrigger) GetModifiedSpanTrigger

func (m *InternalCommitTrigger) GetModifiedSpanTrigger() *ModifiedSpanTrigger

func (*InternalCommitTrigger) GetSplitTrigger

func (m *InternalCommitTrigger) GetSplitTrigger() *SplitTrigger

func (*InternalCommitTrigger) Marshal

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

func (*InternalCommitTrigger) MarshalTo

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

func (*InternalCommitTrigger) ProtoMessage

func (*InternalCommitTrigger) ProtoMessage()

func (*InternalCommitTrigger) Reset

func (m *InternalCommitTrigger) Reset()

func (*InternalCommitTrigger) Size

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

func (*InternalCommitTrigger) String

func (m *InternalCommitTrigger) String() string

func (*InternalCommitTrigger) Unmarshal

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

type InternalServer

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

type InternalTimeSeriesData

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

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

func (*InternalTimeSeriesData) Marshal

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

func (*InternalTimeSeriesData) MarshalTo

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

func (*InternalTimeSeriesData) ProtoMessage

func (*InternalTimeSeriesData) ProtoMessage()

func (*InternalTimeSeriesData) Reset

func (m *InternalTimeSeriesData) Reset()

func (*InternalTimeSeriesData) Size

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

func (*InternalTimeSeriesData) String

func (m *InternalTimeSeriesData) String() string

func (*InternalTimeSeriesData) Unmarshal

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

type InternalTimeSeriesSample

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

func (samp InternalTimeSeriesSample) Average() float64

Average returns the average value for this sample.

func (*InternalTimeSeriesSample) Descriptor

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

func (*InternalTimeSeriesSample) Marshal

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

func (*InternalTimeSeriesSample) MarshalTo

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

func (InternalTimeSeriesSample) Maximum

func (samp InternalTimeSeriesSample) Maximum() float64

Maximum returns the maximum value encountered by this sample.

func (InternalTimeSeriesSample) Minimum

func (samp InternalTimeSeriesSample) Minimum() float64

Minimum returns the minimum value encountered by this sample.

func (*InternalTimeSeriesSample) ProtoMessage

func (*InternalTimeSeriesSample) ProtoMessage()

func (*InternalTimeSeriesSample) Reset

func (m *InternalTimeSeriesSample) Reset()

func (*InternalTimeSeriesSample) Size

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

func (*InternalTimeSeriesSample) String

func (m *InternalTimeSeriesSample) String() string

func (InternalTimeSeriesSample) Summation

func (samp InternalTimeSeriesSample) Summation() float64

Summation returns the sum value for this sample.

func (*InternalTimeSeriesSample) Unmarshal

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

type Key

type Key []byte

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

func (Key) Compare

func (k Key) Compare(b Key) int

Compare compares the two Keys.

func (Key) Equal

func (k Key) Equal(l Key) bool

Equal returns whether two keys are identical.

func (Key) Format

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

Format implements the fmt.Formatter interface.

func (Key) IsPrev

func (k Key) IsPrev(m Key) bool

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

func (Key) Next

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

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

func (k Key) String() string

String returns a string-formatted version of the key.

type KeyValue

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

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

func (*KeyValue) Marshal

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

func (*KeyValue) MarshalTo

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

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) Size

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

func (*KeyValue) String

func (m *KeyValue) String() string

func (*KeyValue) Unmarshal

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

type KeyValueByKey

type KeyValueByKey []KeyValue

KeyValueByKey implements sorting of a slice of KeyValues by key.

func (KeyValueByKey) Len

func (kv KeyValueByKey) Len() int

Len implements sort.Interface.

func (KeyValueByKey) Less

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

Less implements sort.Interface.

func (KeyValueByKey) Swap

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

Swap implements sort.Interface.

type Lease

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"`
	// 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"`
	// The start of the lease stasis period. This field is deprecated.
	DeprecatedStartStasis cockroach_util_hlc.Timestamp `protobuf:"bytes,4,opt,name=deprecated_start_stasis,json=deprecatedStartStasis" json:"deprecated_start_stasis"`
	// The current timestamp when this lease has been proposed. Used after a
	// transfer and after a node restart to enforce that a node only uses leases
	// proposed after the time of the said transfer or restart. This is nullable
	// to help with the rollout (such that a lease applied by some nodes before
	// the rollout and some nodes after the rollout is serialized the same).
	// TODO(andrei): Make this non-nullable after the rollout.
	ProposedTS *cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=proposed_ts,json=proposedTs" json:"proposed_ts,omitempty"`
	// The epoch of the lease holder's node liveness entry. If this value
	// is non-zero, the start and expiration values are ignored.
	Epoch *int64 `protobuf:"varint,6,opt,name=epoch" json:"epoch,omitempty"`
}

Lease contains information about range leases including the expiration and lease holder.

func NewPopulatedLease

func NewPopulatedLease(r randyData, easy bool) *Lease

func (*Lease) Descriptor

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

func (*Lease) Equal added in v1.1.0

func (this *Lease) Equal(that interface{}) bool

func (Lease) Equivalent

func (l Lease) Equivalent(ol Lease) bool

Equivalent determines whether ol is considered the same lease for the purposes of matching leases when executing a command. For expiration-based leases, extensions are allowed. Ignore proposed timestamps for lease verification; for epoch- based leases, the start time of the lease is sufficient to avoid using an older lease with same epoch.

func (*Lease) Marshal

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

func (*Lease) MarshalTo

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

func (Lease) OwnedBy

func (l Lease) OwnedBy(storeID StoreID) bool

OwnedBy returns whether the given store is the lease owner.

func (*Lease) ProtoMessage

func (*Lease) ProtoMessage()

func (*Lease) Reset

func (m *Lease) Reset()

func (*Lease) Size

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

func (Lease) String

func (l Lease) String() string

func (Lease) Type

func (l Lease) Type() LeaseType

Type returns the lease type.

func (*Lease) Unmarshal

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

type LeaseInfoRequest

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

LeaseInfoRequest is the argument to the LeaseInfo() method, for getting information about a range's lease. It's a point request, so it addresses one single range, and returns the lease currently in effect for that range.

func (*LeaseInfoRequest) Descriptor

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

func (*LeaseInfoRequest) Equal added in v1.1.0

func (this *LeaseInfoRequest) Equal(that interface{}) bool

func (*LeaseInfoRequest) Marshal

func (m *LeaseInfoRequest) Marshal() (dAtA []byte, err error)

func (*LeaseInfoRequest) MarshalTo

func (m *LeaseInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*LeaseInfoRequest) Method

func (*LeaseInfoRequest) Method() Method

Method implements the Request interface.

func (*LeaseInfoRequest) ProtoMessage

func (*LeaseInfoRequest) ProtoMessage()

func (*LeaseInfoRequest) Reset

func (m *LeaseInfoRequest) Reset()

func (*LeaseInfoRequest) ShallowCopy

func (lt *LeaseInfoRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*LeaseInfoRequest) Size

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

func (*LeaseInfoRequest) String

func (m *LeaseInfoRequest) String() string

func (*LeaseInfoRequest) Unmarshal

func (m *LeaseInfoRequest) Unmarshal(dAtA []byte) error

type LeaseInfoResponse

type LeaseInfoResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// The last lease known by the replica serving the request. It can also be the
	// tentative future lease, if a lease transfer is in progress.
	Lease Lease `protobuf:"bytes,2,opt,name=lease" json:"lease"`
}

LeaseInfoResponse is the response to a LeaseInfo() operation.

func (*LeaseInfoResponse) Descriptor

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

func (*LeaseInfoResponse) Marshal

func (m *LeaseInfoResponse) Marshal() (dAtA []byte, err error)

func (*LeaseInfoResponse) MarshalTo

func (m *LeaseInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*LeaseInfoResponse) ProtoMessage

func (*LeaseInfoResponse) ProtoMessage()

func (*LeaseInfoResponse) Reset

func (m *LeaseInfoResponse) Reset()

func (*LeaseInfoResponse) Size

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

func (*LeaseInfoResponse) String

func (m *LeaseInfoResponse) String() string

func (*LeaseInfoResponse) Unmarshal

func (m *LeaseInfoResponse) Unmarshal(dAtA []byte) error

type LeaseRejectedError

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

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

func (*LeaseRejectedError) Equal added in v1.1.0

func (this *LeaseRejectedError) Equal(that interface{}) bool

func (*LeaseRejectedError) Error

func (e *LeaseRejectedError) Error() string

func (*LeaseRejectedError) Marshal

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

func (*LeaseRejectedError) MarshalTo

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

func (*LeaseRejectedError) ProtoMessage

func (*LeaseRejectedError) ProtoMessage()

func (*LeaseRejectedError) Reset

func (m *LeaseRejectedError) Reset()

func (*LeaseRejectedError) Size

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

func (*LeaseRejectedError) String

func (m *LeaseRejectedError) String() string

func (*LeaseRejectedError) Unmarshal

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

type LeaseType

type LeaseType int

LeaseType describes the type of lease.

const (
	// LeaseNone specifies no lease, to be used as a default value.
	LeaseNone LeaseType = iota
	// LeaseExpiration allows range operations while the wall clock is
	// within the expiration timestamp.
	LeaseExpiration
	// LeaseEpoch allows range operations while the node liveness epoch
	// is equal to the lease epoch.
	LeaseEpoch
)

type Locality

type Locality struct {
	Tiers []Tier `protobuf:"bytes,1,rep,name=tiers" json:"tiers"`
}

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

func (*Locality) Descriptor

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

func (Locality) DiversityScore

func (l Locality) DiversityScore(other Locality) float64

DiversityScore returns a score comparing the two localities which ranges from 1, meaning completely diverse, to 0 which means not diverse at all (that their localities match). This function ignores the locality tier key names and only considers differences in their values.

All localities are sorted from most global to most local so any localities after any differing values are irrelevant.

While we recommend that all nodes have the same locality keys and same total number of keys, there's nothing wrong with having different locality keys as long as the immediately next keys are all the same for each value. For example: region:USA -> state:NY -> ... region:USA -> state:WA -> ... region:EUR -> country:UK -> ... region:EUR -> country:France -> ... is perfectly fine. This holds true at each level lower as well.

There is also a need to consider the cases where the localities have different lengths. For these cases, we treat the missing key on one side as different.

func (*Locality) Marshal

func (m *Locality) Marshal() (dAtA []byte, err error)

func (*Locality) MarshalTo

func (m *Locality) MarshalTo(dAtA []byte) (int, error)

func (*Locality) ProtoMessage

func (*Locality) ProtoMessage()

func (*Locality) Reset

func (m *Locality) Reset()

func (*Locality) Set

func (l *Locality) Set(value string) error

Set sets the value of the Locality. It is the important part of pflag's value interface.

func (*Locality) Size

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

func (Locality) String

func (l Locality) String() string

String returns a string representation of all the Tiers. This is part of pflag's value interface.

func (Locality) Type

func (Locality) Type() string

Type returns the underlying type in string form. This is part of pflag's value interface.

func (*Locality) Unmarshal

func (m *Locality) Unmarshal(dAtA []byte) error

type MergeRequest

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

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

func (*MergeRequest) Equal added in v1.1.0

func (this *MergeRequest) Equal(that interface{}) bool

func (*MergeRequest) Marshal

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

func (*MergeRequest) MarshalTo

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

func (*MergeRequest) Method

func (*MergeRequest) Method() Method

Method implements the Request interface.

func (*MergeRequest) ProtoMessage

func (*MergeRequest) ProtoMessage()

func (*MergeRequest) Reset

func (m *MergeRequest) Reset()

func (*MergeRequest) ShallowCopy

func (mr *MergeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*MergeRequest) Size

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

func (*MergeRequest) String

func (m *MergeRequest) String() string

func (*MergeRequest) Unmarshal

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

type MergeResponse

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

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

func (*MergeResponse) Marshal

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

func (*MergeResponse) MarshalTo

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

func (*MergeResponse) ProtoMessage

func (*MergeResponse) ProtoMessage()

func (*MergeResponse) Reset

func (m *MergeResponse) Reset()

func (*MergeResponse) Size

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

func (*MergeResponse) String

func (m *MergeResponse) String() string

func (*MergeResponse) Unmarshal

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

type MergeTrigger

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

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

func (*MergeTrigger) Equal added in v1.1.0

func (this *MergeTrigger) Equal(that interface{}) bool

func (*MergeTrigger) Marshal

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

func (*MergeTrigger) MarshalTo

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

func (*MergeTrigger) ProtoMessage

func (*MergeTrigger) ProtoMessage()

func (*MergeTrigger) Reset

func (m *MergeTrigger) Reset()

func (*MergeTrigger) Size

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

func (*MergeTrigger) String

func (m *MergeTrigger) String() string

func (*MergeTrigger) Unmarshal

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

type Method

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
	// AdminTransferLease is called to initiate a range lease transfer.
	AdminTransferLease
	// AdminChangeReplicas is called to add or remove replicas for a range.
	AdminChangeReplicas
	// 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
	// QueryTxn fetches the current state of the designated transaction.
	QueryTxn
	// 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
	// LeaseInfo returns information about a range's lease.
	LeaseInfo
	// ComputeChecksum starts a checksum computation over a replica snapshot.
	ComputeChecksum
	// DeprecatedVerifyChecksum is no longer used.
	DeprecatedVerifyChecksum
	// 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
	// WriteBatch applies the operations encoded in a BatchRepr.
	WriteBatch
	// Export dumps a keyrange into files.
	Export
	// Import bulk loads key/value entries.
	Import
	// AdminScatter moves replicas and leaseholders for a selection of ranges.
	// Best-effort.
	AdminScatter
	// AddSSTable links a file into the RocksDB log-structured merge-tree.
	AddSSTable
)

func (Method) String

func (i Method) String() string

type ModifiedSpanTrigger

type ModifiedSpanTrigger struct {
	SystemConfigSpan bool `protobuf:"varint,1,opt,name=system_config_span,json=systemConfigSpan" json:"system_config_span"`
	// node_liveness_span is set to indicate that node liveness records
	// need re-gossiping after modification or range lease updates. The
	// span is set to a single key when nodes update their liveness records
	// with heartbeats to extend the expiration timestamp. Changes to the
	// range lease for the range containing node liveness triggers re-gossip
	// of the entire node liveness key range.
	NodeLivenessSpan *Span `protobuf:"bytes,2,opt,name=node_liveness_span,json=nodeLivenessSpan" json:"node_liveness_span,omitempty"`
}

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

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

func (*ModifiedSpanTrigger) Equal added in v1.1.0

func (this *ModifiedSpanTrigger) Equal(that interface{}) bool

func (*ModifiedSpanTrigger) Marshal

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

func (*ModifiedSpanTrigger) MarshalTo

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

func (*ModifiedSpanTrigger) ProtoMessage

func (*ModifiedSpanTrigger) ProtoMessage()

func (*ModifiedSpanTrigger) Reset

func (m *ModifiedSpanTrigger) Reset()

func (*ModifiedSpanTrigger) Size

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

func (*ModifiedSpanTrigger) String

func (m *ModifiedSpanTrigger) String() string

func (*ModifiedSpanTrigger) Unmarshal

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

type NodeDescriptor

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"`
	Locality      Locality                      `protobuf:"bytes,4,opt,name=locality" json:"locality"`
	ServerVersion Version                       `protobuf:"bytes,5,opt,name=ServerVersion" json:"ServerVersion"`
}

NodeDescriptor holds details on node physical/network topology.

func (*NodeDescriptor) Descriptor

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

func (*NodeDescriptor) Marshal

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

func (*NodeDescriptor) MarshalTo

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

func (*NodeDescriptor) ProtoMessage

func (*NodeDescriptor) ProtoMessage()

func (*NodeDescriptor) Reset

func (m *NodeDescriptor) Reset()

func (*NodeDescriptor) Size

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

func (*NodeDescriptor) String

func (m *NodeDescriptor) String() string

func (*NodeDescriptor) Unmarshal

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

type NodeID

type NodeID int32

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

func (NodeID) String

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

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

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

func (*NodeUnavailableError) Equal added in v1.1.0

func (this *NodeUnavailableError) Equal(that interface{}) bool

func (*NodeUnavailableError) Error

func (e *NodeUnavailableError) Error() string

func (*NodeUnavailableError) Marshal

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

func (*NodeUnavailableError) MarshalTo

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

func (*NodeUnavailableError) ProtoMessage

func (*NodeUnavailableError) ProtoMessage()

func (*NodeUnavailableError) Reset

func (m *NodeUnavailableError) Reset()

func (*NodeUnavailableError) Size

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

func (*NodeUnavailableError) String

func (m *NodeUnavailableError) String() string

func (*NodeUnavailableError) Unmarshal

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

type NoopRequest

type NoopRequest struct {
}

A NoopRequest is a no-op.

func (*NoopRequest) Descriptor

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

func (*NoopRequest) Header

func (*NoopRequest) Header() Span

Header implements the Request interface.

func (*NoopRequest) Marshal

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

func (*NoopRequest) MarshalTo

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

func (*NoopRequest) Method

func (*NoopRequest) Method() Method

Method implements the Request interface.

func (*NoopRequest) ProtoMessage

func (*NoopRequest) ProtoMessage()

func (*NoopRequest) Reset

func (m *NoopRequest) Reset()

func (*NoopRequest) SetHeader

func (*NoopRequest) SetHeader(_ Span)

SetHeader implements the Request interface.

func (*NoopRequest) ShallowCopy

func (nr *NoopRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*NoopRequest) Size

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

func (*NoopRequest) String

func (m *NoopRequest) String() string

func (*NoopRequest) Unmarshal

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

type NoopResponse

type NoopResponse struct {
}

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

func (*NoopResponse) Descriptor

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

func (*NoopResponse) Header

func (*NoopResponse) Header() ResponseHeader

Header implements the Response interface.

func (*NoopResponse) Marshal

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

func (*NoopResponse) MarshalTo

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

func (*NoopResponse) ProtoMessage

func (*NoopResponse) ProtoMessage()

func (*NoopResponse) Reset

func (m *NoopResponse) Reset()

func (*NoopResponse) SetHeader

func (*NoopResponse) SetHeader(_ ResponseHeader)

SetHeader implements the Response interface.

func (*NoopResponse) Size

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

func (*NoopResponse) String

func (m *NoopResponse) String() string

func (*NoopResponse) Unmarshal

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

func (*NoopResponse) Verify

func (*NoopResponse) Verify(_ Request) error

Verify implements the Response interface.

type NotLeaseHolderError

type NotLeaseHolderError struct {
	// The replica the error originated from. Used in the error's string
	// representation.
	Replica ReplicaDescriptor `protobuf:"bytes,1,opt,name=replica" json:"replica"`
	// The lease holder, if known.
	LeaseHolder *ReplicaDescriptor `protobuf:"bytes,2,opt,name=lease_holder,json=leaseHolder" json:"lease_holder,omitempty"`
	// The current lease, if known. This might be nil even when lease_holder is
	// set, as sometimes one can create this error without actually knowing the
	// current lease, but having a guess about who the leader is.
	Lease   *Lease  `protobuf:"bytes,4,opt,name=lease" json:"lease,omitempty"`
	RangeID RangeID `protobuf:"varint,3,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
	// If set, the Error() method will return this instead of composing its
	// regular spiel. Useful because we reuse this error when rejecting a command
	// because the lease under which its application was attempted is different
	// than the lease under which it had been proposed.
	CustomMsg string `protobuf:"bytes,5,opt,name=custom_msg,json=customMsg" json:"custom_msg"`
}

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

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

func (*NotLeaseHolderError) Equal added in v1.1.0

func (this *NotLeaseHolderError) Equal(that interface{}) bool

func (*NotLeaseHolderError) Error

func (e *NotLeaseHolderError) Error() string

func (*NotLeaseHolderError) Marshal

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

func (*NotLeaseHolderError) MarshalTo

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

func (*NotLeaseHolderError) ProtoMessage

func (*NotLeaseHolderError) ProtoMessage()

func (*NotLeaseHolderError) Reset

func (m *NotLeaseHolderError) Reset()

func (*NotLeaseHolderError) Size

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

func (*NotLeaseHolderError) String

func (m *NotLeaseHolderError) String() string

func (*NotLeaseHolderError) Unmarshal

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

type NumericStat

type NumericStat struct {
	// NumericStat keeps track of two running values --- the running mean and
	// the running sum of squared differences from the mean. Using this along
	// with the total count of values, we can compute variance using Welford's
	// method. This is more reliable than keeping track of the sum of
	// squared values, which is liable to overflow. See
	// https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
	Mean         float64 `protobuf:"fixed64,1,opt,name=mean" json:"mean"`
	SquaredDiffs float64 `protobuf:"fixed64,2,opt,name=squared_diffs,json=squaredDiffs" json:"squared_diffs"`
}

func AddNumericStats added in v1.1.0

func AddNumericStats(a, b NumericStat, countA, countB int64) NumericStat

AddNumericStats combines derived statistics. Adapted from https://www.johndcook.com/blog/skewness_kurtosis/

func (*NumericStat) Add added in v1.1.0

func (l *NumericStat) Add(b NumericStat, countA, countB int64)

Add combines b into this derived statistics.

func (*NumericStat) Descriptor

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

func (*NumericStat) GetVariance

func (l *NumericStat) GetVariance(count int64) float64

GetVariance retrieves the variance of the values.

func (*NumericStat) Marshal

func (m *NumericStat) Marshal() (dAtA []byte, err error)

func (*NumericStat) MarshalTo

func (m *NumericStat) MarshalTo(dAtA []byte) (int, error)

func (*NumericStat) ProtoMessage

func (*NumericStat) ProtoMessage()

func (*NumericStat) Record

func (l *NumericStat) Record(count int64, val float64)

Record updates the underlying running counts, incorporating the given value. It follows Welford's algorithm (Technometrics, 1962). The running count must be stored as it is required to finalize and retrieve the variance.

func (*NumericStat) Reset

func (m *NumericStat) Reset()

func (*NumericStat) Size

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

func (*NumericStat) String

func (m *NumericStat) String() string

func (*NumericStat) Unmarshal

func (m *NumericStat) Unmarshal(dAtA []byte) error

type ObservedTimestamp

type ObservedTimestamp struct {
	NodeID    NodeID                       `protobuf:"varint,1,opt,name=node_id,json=nodeId,casttype=NodeID" json:"node_id"`
	Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp"`
}

func NewPopulatedObservedTimestamp

func NewPopulatedObservedTimestamp(r randyData, easy bool) *ObservedTimestamp

func (*ObservedTimestamp) Descriptor

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

func (*ObservedTimestamp) Equal added in v1.1.0

func (this *ObservedTimestamp) Equal(that interface{}) bool

func (*ObservedTimestamp) Marshal

func (m *ObservedTimestamp) Marshal() (dAtA []byte, err error)

func (*ObservedTimestamp) MarshalTo

func (m *ObservedTimestamp) MarshalTo(dAtA []byte) (int, error)

func (*ObservedTimestamp) ProtoMessage

func (*ObservedTimestamp) ProtoMessage()

func (*ObservedTimestamp) Reset

func (m *ObservedTimestamp) Reset()

func (*ObservedTimestamp) Size

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

func (*ObservedTimestamp) String

func (m *ObservedTimestamp) String() string

func (*ObservedTimestamp) Unmarshal

func (m *ObservedTimestamp) Unmarshal(dAtA []byte) error

type OpRequiresTxnError

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

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

func (*OpRequiresTxnError) Equal added in v1.1.0

func (this *OpRequiresTxnError) Equal(that interface{}) bool

func (*OpRequiresTxnError) Error

func (e *OpRequiresTxnError) Error() string

func (*OpRequiresTxnError) Marshal

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

func (*OpRequiresTxnError) MarshalTo

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

func (*OpRequiresTxnError) ProtoMessage

func (*OpRequiresTxnError) ProtoMessage()

func (*OpRequiresTxnError) Reset

func (m *OpRequiresTxnError) Reset()

func (*OpRequiresTxnError) Size

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

func (*OpRequiresTxnError) String

func (m *OpRequiresTxnError) String() string

func (*OpRequiresTxnError) Unmarshal

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

type Percentiles added in v1.1.0

type Percentiles struct {
	P10 float64 `protobuf:"fixed64,1,opt,name=p10" json:"p10"`
	P25 float64 `protobuf:"fixed64,2,opt,name=p25" json:"p25"`
	P50 float64 `protobuf:"fixed64,3,opt,name=p50" json:"p50"`
	P75 float64 `protobuf:"fixed64,4,opt,name=p75" json:"p75"`
	P90 float64 `protobuf:"fixed64,5,opt,name=p90" json:"p90"`
}

Percentiles contains a handful of hard-coded percentiles meant to summarize a distribution.

func PercentilesFromData added in v1.1.0

func PercentilesFromData(data []float64) Percentiles

PercentilesFromData derives percentiles from a slice of data points. Sorts the input data if it isn't already sorted.

func (*Percentiles) Descriptor added in v1.1.0

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

func (*Percentiles) Marshal added in v1.1.0

func (m *Percentiles) Marshal() (dAtA []byte, err error)

func (*Percentiles) MarshalTo added in v1.1.0

func (m *Percentiles) MarshalTo(dAtA []byte) (int, error)

func (*Percentiles) ProtoMessage added in v1.1.0

func (*Percentiles) ProtoMessage()

func (*Percentiles) Reset added in v1.1.0

func (m *Percentiles) Reset()

func (*Percentiles) Size added in v1.1.0

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

func (Percentiles) String added in v1.1.0

func (p Percentiles) String() string

String returns a string representation of the Percentiles.

func (*Percentiles) Unmarshal added in v1.1.0

func (m *Percentiles) Unmarshal(dAtA []byte) error

type PushTxnRequest

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 pusher, pusher_txn will only have the priority set (in
	// particular, ID won't be set). 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"`
	// Forces the push by overriding the normal checks in PushTxn to
	// either abort or push the timestamp.
	Force bool `protobuf:"varint,7,opt,name=force" json:"force"`
}

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.

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

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

func (*PushTxnRequest) Equal added in v1.1.0

func (this *PushTxnRequest) Equal(that interface{}) bool

func (*PushTxnRequest) Marshal

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

func (*PushTxnRequest) MarshalTo

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

func (*PushTxnRequest) Method

func (*PushTxnRequest) Method() Method

Method implements the Request interface.

func (*PushTxnRequest) ProtoMessage

func (*PushTxnRequest) ProtoMessage()

func (*PushTxnRequest) Reset

func (m *PushTxnRequest) Reset()

func (*PushTxnRequest) ShallowCopy

func (ptr *PushTxnRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*PushTxnRequest) Size

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

func (*PushTxnRequest) String

func (m *PushTxnRequest) String() string

func (*PushTxnRequest) Unmarshal

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

type PushTxnResponse

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

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

func (*PushTxnResponse) Marshal

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

func (*PushTxnResponse) MarshalTo

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

func (*PushTxnResponse) ProtoMessage

func (*PushTxnResponse) ProtoMessage()

func (*PushTxnResponse) Reset

func (m *PushTxnResponse) Reset()

func (*PushTxnResponse) Size

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

func (*PushTxnResponse) String

func (m *PushTxnResponse) String() string

func (*PushTxnResponse) Unmarshal

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

type PushTxnType

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
	// Deprecated. Use QueryTxn instead.
	PUSH_QUERY PushTxnType = 3
)

func (PushTxnType) Enum

func (x PushTxnType) Enum() *PushTxnType

func (PushTxnType) EnumDescriptor

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

func (PushTxnType) String

func (x PushTxnType) String() string

func (*PushTxnType) UnmarshalJSON

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

type PutRequest

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

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

func (*PutRequest) Equal added in v1.1.0

func (this *PutRequest) Equal(that interface{}) bool

func (*PutRequest) Marshal

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

func (*PutRequest) MarshalTo

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

func (*PutRequest) Method

func (*PutRequest) Method() Method

Method implements the Request interface.

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset

func (m *PutRequest) Reset()

func (*PutRequest) ShallowCopy

func (pr *PutRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*PutRequest) Size

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

func (*PutRequest) String

func (m *PutRequest) String() string

func (*PutRequest) Unmarshal

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

type PutResponse

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

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

func (*PutResponse) Marshal

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

func (*PutResponse) MarshalTo

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

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) Size

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

func (*PutResponse) String

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal

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

type QueryTxnRequest

type QueryTxnRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Transaction record to query.
	Txn cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,2,opt,name=txn" json:"txn"`
	// If true, the query will not return until there are changes to either the
	// transaction status or priority -OR- to the set of dependent transactions.
	WaitForUpdate bool `protobuf:"varint,3,opt,name=wait_for_update,json=waitForUpdate" json:"wait_for_update"`
	// Set of known dependent transactions.
	KnownWaitingTxns []github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `` /* 167-byte string literal not displayed */
}

A QueryTxnResponse is arguments to the QueryTxn() method. It's sent by transactions which are waiting to push another transaction because of conflicting write intents to fetch updates to either the pusher's or the pushee's transaction records.

func (*QueryTxnRequest) Descriptor

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

func (*QueryTxnRequest) Equal added in v1.1.0

func (this *QueryTxnRequest) Equal(that interface{}) bool

func (*QueryTxnRequest) Marshal

func (m *QueryTxnRequest) Marshal() (dAtA []byte, err error)

func (*QueryTxnRequest) MarshalTo

func (m *QueryTxnRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryTxnRequest) Method

func (*QueryTxnRequest) Method() Method

Method implements the Request interface.

func (*QueryTxnRequest) ProtoMessage

func (*QueryTxnRequest) ProtoMessage()

func (*QueryTxnRequest) Reset

func (m *QueryTxnRequest) Reset()

func (*QueryTxnRequest) ShallowCopy

func (qtr *QueryTxnRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*QueryTxnRequest) Size

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

func (*QueryTxnRequest) String

func (m *QueryTxnRequest) String() string

func (*QueryTxnRequest) Unmarshal

func (m *QueryTxnRequest) Unmarshal(dAtA []byte) error

type QueryTxnResponse

type QueryTxnResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Contains the current state of the queried transaction. If the queried
	// transaction record does not exist, this will be empty.
	QueriedTxn Transaction `protobuf:"bytes,2,opt,name=queried_txn,json=queriedTxn" json:"queried_txn"`
	// Specifies a list of transaction IDs which are waiting on the txn.
	WaitingTxns []github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `` /* 150-byte string literal not displayed */
}

A QueryTxnResponse is the return value from the QueryTxn() method.

func (*QueryTxnResponse) Descriptor

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

func (*QueryTxnResponse) Marshal

func (m *QueryTxnResponse) Marshal() (dAtA []byte, err error)

func (*QueryTxnResponse) MarshalTo

func (m *QueryTxnResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTxnResponse) ProtoMessage

func (*QueryTxnResponse) ProtoMessage()

func (*QueryTxnResponse) Reset

func (m *QueryTxnResponse) Reset()

func (*QueryTxnResponse) Size

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

func (*QueryTxnResponse) String

func (m *QueryTxnResponse) String() string

func (*QueryTxnResponse) Unmarshal

func (m *QueryTxnResponse) Unmarshal(dAtA []byte) error

type RKey

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

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

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

Equal checks for byte-wise equality.

func (RKey) Less

func (rk RKey) Less(otherRK RKey) bool

Less compares two RKeys.

func (RKey) Next

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

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

func (rk RKey) String() string

type RSpan

type RSpan struct {
	Key, EndKey RKey
}

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

func (RSpan) ContainsExclusiveEndKey

func (rs RSpan) ContainsExclusiveEndKey(key RKey) bool

ContainsExclusiveEndKey returns whether this span contains the specified key. A span is considered to include its EndKey (e.g., span ["a", b") contains "b" according to this function, but does not contain "a").

func (RSpan) ContainsKey

func (rs RSpan) ContainsKey(key RKey) bool

ContainsKey returns whether this span contains the specified key.

func (RSpan) ContainsKeyInverted added in v1.1.4

func (rs RSpan) ContainsKeyInverted(key RKey) bool

ContainsKeyInverted returns whether this span contains the specified key. The receiver span is considered inverted, meaning that instead of containing the range ["key","endKey"), it contains the range ("key","endKey"].

func (RSpan) ContainsKeyRange

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

func (rs RSpan) Equal(o RSpan) bool

Equal compares for equality.

func (RSpan) Intersect

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.

func (RSpan) Overlaps

func (rs RSpan) Overlaps(other RSpan) bool

Overlaps returns whether the two spans overlap.

func (RSpan) String

func (rs RSpan) String() string

type RaftGroupDeletedError

type RaftGroupDeletedError struct {
}

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

func (*RaftGroupDeletedError) Descriptor

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

func (*RaftGroupDeletedError) Equal added in v1.1.0

func (this *RaftGroupDeletedError) Equal(that interface{}) bool

func (*RaftGroupDeletedError) Error

func (e *RaftGroupDeletedError) Error() string

func (*RaftGroupDeletedError) Marshal

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

func (*RaftGroupDeletedError) MarshalTo

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

func (*RaftGroupDeletedError) ProtoMessage

func (*RaftGroupDeletedError) ProtoMessage()

func (*RaftGroupDeletedError) Reset

func (m *RaftGroupDeletedError) Reset()

func (*RaftGroupDeletedError) Size

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

func (*RaftGroupDeletedError) String

func (m *RaftGroupDeletedError) String() string

func (*RaftGroupDeletedError) Unmarshal

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

type RaftSnapshotData

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"`
	// 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

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

func (*RaftSnapshotData) Marshal

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

func (*RaftSnapshotData) MarshalTo

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

func (*RaftSnapshotData) ProtoMessage

func (*RaftSnapshotData) ProtoMessage()

func (*RaftSnapshotData) Reset

func (m *RaftSnapshotData) Reset()

func (*RaftSnapshotData) Size

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

func (*RaftSnapshotData) String

func (m *RaftSnapshotData) String() string

func (*RaftSnapshotData) Unmarshal

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

type RaftSnapshotData_KeyValue

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

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

func (*RaftSnapshotData_KeyValue) Marshal

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

func (*RaftSnapshotData_KeyValue) MarshalTo

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

func (*RaftSnapshotData_KeyValue) ProtoMessage

func (*RaftSnapshotData_KeyValue) ProtoMessage()

func (*RaftSnapshotData_KeyValue) Reset

func (m *RaftSnapshotData_KeyValue) Reset()

func (*RaftSnapshotData_KeyValue) Size

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

func (*RaftSnapshotData_KeyValue) String

func (m *RaftSnapshotData_KeyValue) String() string

func (*RaftSnapshotData_KeyValue) Unmarshal

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

type RaftTombstone

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

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

func (*RaftTombstone) Marshal

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

func (*RaftTombstone) MarshalTo

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

func (*RaftTombstone) ProtoMessage

func (*RaftTombstone) ProtoMessage()

func (*RaftTombstone) Reset

func (m *RaftTombstone) Reset()

func (*RaftTombstone) Size

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

func (*RaftTombstone) String

func (m *RaftTombstone) String() string

func (*RaftTombstone) Unmarshal

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

type RaftTruncatedState

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

func NewPopulatedRaftTruncatedState(r randyInternalRaft, easy bool) *RaftTruncatedState

func (*RaftTruncatedState) Descriptor

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

func (*RaftTruncatedState) Equal added in v1.1.0

func (this *RaftTruncatedState) Equal(that interface{}) bool

func (*RaftTruncatedState) Marshal

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

func (*RaftTruncatedState) MarshalTo

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

func (*RaftTruncatedState) ProtoMessage

func (*RaftTruncatedState) ProtoMessage()

func (*RaftTruncatedState) Reset

func (m *RaftTruncatedState) Reset()

func (*RaftTruncatedState) Size

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

func (*RaftTruncatedState) String

func (m *RaftTruncatedState) String() string

func (*RaftTruncatedState) Unmarshal

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

type RangeDescriptor

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

func (r RangeDescriptor) ContainsExclusiveEndKey(key RKey) bool

ContainsExclusiveEndKey returns whether this RangeDescriptor contains the specified end key.

func (RangeDescriptor) ContainsKey

func (r RangeDescriptor) ContainsKey(key RKey) bool

ContainsKey returns whether this RangeDescriptor contains the specified key.

func (RangeDescriptor) ContainsKeyInverted added in v1.1.4

func (r RangeDescriptor) ContainsKeyInverted(key RKey) bool

ContainsKeyInverted returns whether this RangeDescriptor contains the specified key using an inverted range. See RSpan.ContainsKeyInverted.

func (RangeDescriptor) ContainsKeyRange

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

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

func (*RangeDescriptor) Equal

func (this *RangeDescriptor) Equal(that interface{}) bool

func (RangeDescriptor) GetReplicaDescriptor

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

GetReplicaDescriptor returns the replica which matches the specified store ID.

func (RangeDescriptor) GetReplicaDescriptorByID

func (r RangeDescriptor) GetReplicaDescriptorByID(replicaID ReplicaID) (ReplicaDescriptor, bool)

GetReplicaDescriptorByID returns the replica which matches the specified store ID.

func (RangeDescriptor) IsInitialized

func (r RangeDescriptor) IsInitialized() bool

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

func (*RangeDescriptor) Marshal

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

func (*RangeDescriptor) MarshalTo

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

func (*RangeDescriptor) ProtoMessage

func (*RangeDescriptor) ProtoMessage()

func (RangeDescriptor) RSpan

func (r RangeDescriptor) RSpan() RSpan

RSpan returns the RangeDescriptor's resolved span.

func (*RangeDescriptor) Reset

func (m *RangeDescriptor) Reset()

func (*RangeDescriptor) Size

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

func (RangeDescriptor) String

func (r RangeDescriptor) String() string

func (*RangeDescriptor) Unmarshal

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

func (RangeDescriptor) Validate

func (r RangeDescriptor) Validate() error

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

type RangeID

type RangeID int64

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

func (RangeID) String

func (r RangeID) String() string

String implements the fmt.Stringer interface.

type RangeIDSlice

type RangeIDSlice []RangeID

RangeIDSlice implements sort.Interface.

func (RangeIDSlice) Len

func (r RangeIDSlice) Len() int

func (RangeIDSlice) Less

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

func (RangeIDSlice) Swap

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

type RangeInfo

type RangeInfo struct {
	Desc  RangeDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc"`
	Lease Lease           `protobuf:"bytes,2,opt,name=lease" json:"lease"`
}

RangeInfo describes a range which executed a request. It contains the range descriptor and lease information at the time of execution.

func InsertRangeInfo

func InsertRangeInfo(ris []RangeInfo, ri RangeInfo) []RangeInfo

InsertRangeInfo inserts ri into a slice of RangeInfo's if a descriptor for the same range is not already present. If it is present, it's overwritten; the rationale being that ri is newer information than what we had before.

func (*RangeInfo) Descriptor

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

func (*RangeInfo) Marshal

func (m *RangeInfo) Marshal() (dAtA []byte, err error)

func (*RangeInfo) MarshalTo

func (m *RangeInfo) MarshalTo(dAtA []byte) (int, error)

func (*RangeInfo) ProtoMessage

func (*RangeInfo) ProtoMessage()

func (*RangeInfo) Reset

func (m *RangeInfo) Reset()

func (*RangeInfo) Size

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

func (*RangeInfo) String

func (m *RangeInfo) String() string

func (*RangeInfo) Unmarshal

func (m *RangeInfo) Unmarshal(dAtA []byte) error

type RangeKeyMismatchError

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.
	// It is used to update the sender's range cache without an additional range
	// lookup.
	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. It is only populated when the recipient has
	// authoritative knowledge of the range requested by the sender.
	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

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

NewRangeKeyMismatchError initializes a new RangeKeyMismatchError.

func (*RangeKeyMismatchError) Descriptor

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

func (*RangeKeyMismatchError) Equal added in v1.1.0

func (this *RangeKeyMismatchError) Equal(that interface{}) bool

func (*RangeKeyMismatchError) Error

func (e *RangeKeyMismatchError) Error() string

func (*RangeKeyMismatchError) Marshal

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

func (*RangeKeyMismatchError) MarshalTo

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

func (*RangeKeyMismatchError) ProtoMessage

func (*RangeKeyMismatchError) ProtoMessage()

func (*RangeKeyMismatchError) Reset

func (m *RangeKeyMismatchError) Reset()

func (*RangeKeyMismatchError) Size

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

func (*RangeKeyMismatchError) String

func (m *RangeKeyMismatchError) String() string

func (*RangeKeyMismatchError) Unmarshal

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

type RangeLookupRequest

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"`
	// 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

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

func (*RangeLookupRequest) Equal added in v1.1.0

func (this *RangeLookupRequest) Equal(that interface{}) bool

func (*RangeLookupRequest) Marshal

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

func (*RangeLookupRequest) MarshalTo

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

func (*RangeLookupRequest) Method

func (*RangeLookupRequest) Method() Method

Method implements the Request interface.

func (*RangeLookupRequest) ProtoMessage

func (*RangeLookupRequest) ProtoMessage()

func (*RangeLookupRequest) Reset

func (m *RangeLookupRequest) Reset()

func (*RangeLookupRequest) ShallowCopy

func (rlr *RangeLookupRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*RangeLookupRequest) Size

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

func (*RangeLookupRequest) String

func (m *RangeLookupRequest) String() string

func (*RangeLookupRequest) Unmarshal

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

type RangeLookupResponse

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

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

func (*RangeLookupResponse) Marshal

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

func (*RangeLookupResponse) MarshalTo

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

func (*RangeLookupResponse) ProtoMessage

func (*RangeLookupResponse) ProtoMessage()

func (*RangeLookupResponse) Reset

func (m *RangeLookupResponse) Reset()

func (*RangeLookupResponse) Size

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

func (*RangeLookupResponse) String

func (m *RangeLookupResponse) String() string

func (*RangeLookupResponse) Unmarshal

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

type RangeNotFoundError

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

func NewRangeNotFoundError(rangeID RangeID) *RangeNotFoundError

NewRangeNotFoundError initializes a new RangeNotFoundError.

func (*RangeNotFoundError) Descriptor

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

func (*RangeNotFoundError) Equal added in v1.1.0

func (this *RangeNotFoundError) Equal(that interface{}) bool

func (*RangeNotFoundError) Error

func (e *RangeNotFoundError) Error() string

func (*RangeNotFoundError) Marshal

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

func (*RangeNotFoundError) MarshalTo

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

func (*RangeNotFoundError) ProtoMessage

func (*RangeNotFoundError) ProtoMessage()

func (*RangeNotFoundError) Reset

func (m *RangeNotFoundError) Reset()

func (*RangeNotFoundError) Size

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

func (*RangeNotFoundError) String

func (m *RangeNotFoundError) String() string

func (*RangeNotFoundError) Unmarshal

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

type ReadConsistencyType

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

func (ReadConsistencyType) EnumDescriptor

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

func (ReadConsistencyType) String

func (x ReadConsistencyType) String() string

func (*ReadConsistencyType) UnmarshalJSON

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

type ReadWithinUncertaintyIntervalError

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

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

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

func (*ReadWithinUncertaintyIntervalError) Equal added in v1.1.0

func (this *ReadWithinUncertaintyIntervalError) Equal(that interface{}) bool

func (*ReadWithinUncertaintyIntervalError) Error

func (*ReadWithinUncertaintyIntervalError) Marshal

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

func (*ReadWithinUncertaintyIntervalError) MarshalTo

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

func (*ReadWithinUncertaintyIntervalError) ProtoMessage

func (*ReadWithinUncertaintyIntervalError) ProtoMessage()

func (*ReadWithinUncertaintyIntervalError) Reset

func (*ReadWithinUncertaintyIntervalError) Size

func (*ReadWithinUncertaintyIntervalError) String

func (*ReadWithinUncertaintyIntervalError) Unmarshal

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

type ReplicaChangeType

type ReplicaChangeType int32

ReplicaChangeType is a parameter of ChangeReplicasTrigger.

const (
	ADD_REPLICA    ReplicaChangeType = 0
	REMOVE_REPLICA ReplicaChangeType = 1
)

func (ReplicaChangeType) Enum

func (ReplicaChangeType) EnumDescriptor

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

func (ReplicaChangeType) String

func (x ReplicaChangeType) String() string

func (*ReplicaChangeType) UnmarshalJSON

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

type ReplicaCorruptionError

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

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

func (*ReplicaCorruptionError) Equal added in v1.1.0

func (this *ReplicaCorruptionError) Equal(that interface{}) bool

func (*ReplicaCorruptionError) Error

func (e *ReplicaCorruptionError) Error() string

func (*ReplicaCorruptionError) Marshal

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

func (*ReplicaCorruptionError) MarshalTo

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

func (*ReplicaCorruptionError) ProtoMessage

func (*ReplicaCorruptionError) ProtoMessage()

func (*ReplicaCorruptionError) Reset

func (m *ReplicaCorruptionError) Reset()

func (*ReplicaCorruptionError) Size

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

func (*ReplicaCorruptionError) String

func (m *ReplicaCorruptionError) String() string

func (*ReplicaCorruptionError) Unmarshal

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

type ReplicaDescriptor

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

func NewPopulatedReplicaDescriptor(r randyMetadata, easy bool) *ReplicaDescriptor

func (*ReplicaDescriptor) Descriptor

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

func (*ReplicaDescriptor) Equal

func (this *ReplicaDescriptor) Equal(that interface{}) bool

func (*ReplicaDescriptor) Marshal

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

func (*ReplicaDescriptor) MarshalTo

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

func (*ReplicaDescriptor) ProtoMessage

func (*ReplicaDescriptor) ProtoMessage()

func (*ReplicaDescriptor) Reset

func (m *ReplicaDescriptor) Reset()

func (*ReplicaDescriptor) Size

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

func (ReplicaDescriptor) String

func (r ReplicaDescriptor) String() string

func (*ReplicaDescriptor) Unmarshal

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

func (ReplicaDescriptor) Validate

func (r ReplicaDescriptor) Validate() error

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

type ReplicaID

type ReplicaID int32

ReplicaID is a custom type for a range replica ID.

func (ReplicaID) String

func (r ReplicaID) String() string

String implements the fmt.Stringer interface.

type ReplicaIdent

type ReplicaIdent struct {
	RangeID RangeID           `protobuf:"varint,1,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
	Replica ReplicaDescriptor `protobuf:"bytes,2,opt,name=replica" json:"replica"`
}

ReplicaIdent uniquely identifies a specific replica.

func (*ReplicaIdent) Descriptor

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

func (*ReplicaIdent) Marshal

func (m *ReplicaIdent) Marshal() (dAtA []byte, err error)

func (*ReplicaIdent) MarshalTo

func (m *ReplicaIdent) MarshalTo(dAtA []byte) (int, error)

func (*ReplicaIdent) ProtoMessage

func (*ReplicaIdent) ProtoMessage()

func (*ReplicaIdent) Reset

func (m *ReplicaIdent) Reset()

func (*ReplicaIdent) Size

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

func (*ReplicaIdent) String

func (m *ReplicaIdent) String() string

func (*ReplicaIdent) Unmarshal

func (m *ReplicaIdent) Unmarshal(dAtA []byte) error

type ReplicaTooOldError

type ReplicaTooOldError struct {
	// replica_id is the ID of the replica that is too old.
	ReplicaID ReplicaID `protobuf:"varint,1,opt,name=replica_id,json=replicaId,casttype=ReplicaID" json:"replica_id"`
}

ReplicaTooOldError is sent in response to a raft message when the recipient of the raft message believes the sender of the raft message to have been removed from the raft group

func NewReplicaTooOldError

func NewReplicaTooOldError(replicaID ReplicaID) *ReplicaTooOldError

NewReplicaTooOldError initializes a new ReplicaTooOldError.

func (*ReplicaTooOldError) Descriptor

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

func (*ReplicaTooOldError) Equal added in v1.1.0

func (this *ReplicaTooOldError) Equal(that interface{}) bool

func (*ReplicaTooOldError) Error

func (e *ReplicaTooOldError) Error() string

func (*ReplicaTooOldError) Marshal

func (m *ReplicaTooOldError) Marshal() (dAtA []byte, err error)

func (*ReplicaTooOldError) MarshalTo

func (m *ReplicaTooOldError) MarshalTo(dAtA []byte) (int, error)

func (*ReplicaTooOldError) ProtoMessage

func (*ReplicaTooOldError) ProtoMessage()

func (*ReplicaTooOldError) Reset

func (m *ReplicaTooOldError) Reset()

func (*ReplicaTooOldError) Size

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

func (*ReplicaTooOldError) String

func (m *ReplicaTooOldError) String() string

func (*ReplicaTooOldError) Unmarshal

func (m *ReplicaTooOldError) Unmarshal(dAtA []byte) error

type ReplicationTarget

type ReplicationTarget 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"`
}

ReplicationTarget identifies a node/store pair.

func (*ReplicationTarget) Descriptor

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

func (*ReplicationTarget) Equal added in v1.1.0

func (this *ReplicationTarget) Equal(that interface{}) bool

func (*ReplicationTarget) Marshal

func (m *ReplicationTarget) Marshal() (dAtA []byte, err error)

func (*ReplicationTarget) MarshalTo

func (m *ReplicationTarget) MarshalTo(dAtA []byte) (int, error)

func (*ReplicationTarget) ProtoMessage

func (*ReplicationTarget) ProtoMessage()

func (*ReplicationTarget) Reset

func (m *ReplicationTarget) Reset()

func (*ReplicationTarget) Size

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

func (ReplicationTarget) String

func (r ReplicationTarget) String() string

func (*ReplicationTarget) Unmarshal

func (m *ReplicationTarget) Unmarshal(dAtA []byte) error

type Request

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 NewCheckConsistency

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

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

func NewConditionalPut

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

func NewDelete(key Key) Request

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

func NewDeleteRange

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

func NewGet(key Key) Request

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

func NewIncrement

func NewIncrement(key Key, increment int64) Request

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

func NewInitPut

func NewInitPut(key Key, value Value, failOnTombstones bool) Request

NewInitPut returns a Request initialized to put the value at key, as long as the key doesn't exist, returning a ConditionFailedError if the key exists and the existing value is different from value. If failOnTombstones is set to true, tombstones count as mismatched values and will cause a ConditionFailedError.

func NewPut

func NewPut(key Key, value Value) Request

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

func NewPutInline

func NewPutInline(key Key, value Value) Request

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

func NewReverseScan

func NewReverseScan(key, endKey Key) Request

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

func NewScan

func NewScan(key, endKey Key) Request

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

type RequestLeaseRequest

type RequestLeaseRequest struct {
	Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Lease Lease `protobuf:"bytes,2,opt,name=lease" json:"lease"`
	// The previous lease is specified by the caller to verify
	// it has not changed when executing this command.
	PrevLease Lease `protobuf:"bytes,3,opt,name=prev_lease,json=prevLease" json:"prev_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

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

func (*RequestLeaseRequest) Equal added in v1.1.0

func (this *RequestLeaseRequest) Equal(that interface{}) bool

func (*RequestLeaseRequest) Marshal

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

func (*RequestLeaseRequest) MarshalTo

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

func (*RequestLeaseRequest) Method

func (*RequestLeaseRequest) Method() Method

Method implements the Request interface.

func (*RequestLeaseRequest) ProtoMessage

func (*RequestLeaseRequest) ProtoMessage()

func (*RequestLeaseRequest) Reset

func (m *RequestLeaseRequest) Reset()

func (*RequestLeaseRequest) ShallowCopy

func (rlr *RequestLeaseRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*RequestLeaseRequest) Size

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

func (*RequestLeaseRequest) String

func (m *RequestLeaseRequest) String() string

func (*RequestLeaseRequest) Unmarshal

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

type RequestLeaseResponse

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

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

func (*RequestLeaseResponse) Marshal

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

func (*RequestLeaseResponse) MarshalTo

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

func (*RequestLeaseResponse) ProtoMessage

func (*RequestLeaseResponse) ProtoMessage()

func (*RequestLeaseResponse) Reset

func (m *RequestLeaseResponse) Reset()

func (*RequestLeaseResponse) Size

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

func (*RequestLeaseResponse) String

func (m *RequestLeaseResponse) String() string

func (*RequestLeaseResponse) Unmarshal

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

type RequestUnion

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"`
	AdminTransferLease       *AdminTransferLeaseRequest       `protobuf:"bytes,29,opt,name=admin_transfer_lease,json=adminTransferLease" json:"admin_transfer_lease,omitempty"`
	AdminChangeReplicas      *AdminChangeReplicasRequest      `protobuf:"bytes,35,opt,name=admin_change_replicas,json=adminChangeReplicas" json:"admin_change_replicas,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"`
	DeprecatedVerifyChecksum *DeprecatedVerifyChecksumRequest `` /* 129-byte string literal not displayed */
	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"`
	TransferLease            *TransferLeaseRequest            `protobuf:"bytes,28,opt,name=transfer_lease,json=transferLease" json:"transfer_lease,omitempty"`
	LeaseInfo                *LeaseInfoRequest                `protobuf:"bytes,30,opt,name=lease_info,json=leaseInfo" json:"lease_info,omitempty"`
	WriteBatch               *WriteBatchRequest               `protobuf:"bytes,31,opt,name=write_batch,json=writeBatch" json:"write_batch,omitempty"`
	Export                   *ExportRequest                   `protobuf:"bytes,32,opt,name=export" json:"export,omitempty"`
	Import                   *ImportRequest                   `protobuf:"bytes,34,opt,name=import" json:"import,omitempty"`
	QueryTxn                 *QueryTxnRequest                 `protobuf:"bytes,33,opt,name=query_txn,json=queryTxn" json:"query_txn,omitempty"`
	AdminScatter             *AdminScatterRequest             `protobuf:"bytes,36,opt,name=admin_scatter,json=adminScatter" json:"admin_scatter,omitempty"`
	AddSstable               *AddSSTableRequest               `protobuf:"bytes,37,opt,name=add_sstable,json=addSstable" json:"add_sstable,omitempty"`
}

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

WARNING: Do not remove fields from RequestUnion. Instead, remove all non-header fields from the request message and prepend its name with "Deprecated". See DeprecatedVerifyChecksumRequest for an example.

Be cautious about deprecating fields as doing so can lead to inconsistencies between replicas.

func (*RequestUnion) Descriptor

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

func (RequestUnion) GetInner

func (ru RequestUnion) GetInner() Request

GetInner returns the Request contained in the union.

func (*RequestUnion) GetValue

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

func (*RequestUnion) Marshal

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

func (*RequestUnion) MarshalTo

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

func (*RequestUnion) MustSetInner

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

func (*RequestUnion) ProtoMessage()

func (*RequestUnion) Reset

func (m *RequestUnion) Reset()

func (*RequestUnion) SetValue

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

func (*RequestUnion) Size

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

func (*RequestUnion) String

func (m *RequestUnion) String() string

func (*RequestUnion) Unmarshal

func (m *RequestUnion) Unmarshal(dAtA []byte) error

type ResolveIntentRangeRequest

type ResolveIntentRangeRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// The transaction whose intents are being resolved.
	IntentTxn cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,2,opt,name=intent_txn,json=intentTxn" json:"intent_txn"`
	// The status of the transaction.
	Status TransactionStatus `protobuf:"varint,3,opt,name=status,enum=cockroach.roachpb.TransactionStatus" json:"status"`
	// Optionally poison the sequence cache for the transaction on all ranges
	// on which the intents reside.
	Poison bool `protobuf:"varint,4,opt,name=poison" json:"poison"`
}

A ResolveIntentRangeRequest is arguments to the ResolveIntentRange() method. It is sent by transaction coordinators after success calling PushTxn to clean up write intents: either to remove, commit or move them forward in time.

func (*ResolveIntentRangeRequest) Descriptor

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

func (*ResolveIntentRangeRequest) Equal added in v1.1.0

func (this *ResolveIntentRangeRequest) Equal(that interface{}) bool

func (*ResolveIntentRangeRequest) Marshal

func (m *ResolveIntentRangeRequest) Marshal() (dAtA []byte, err error)

func (*ResolveIntentRangeRequest) MarshalTo

func (m *ResolveIntentRangeRequest) MarshalTo(dAtA []byte) (int, error)

func (*ResolveIntentRangeRequest) Method

Method implements the Request interface.

func (*ResolveIntentRangeRequest) ProtoMessage

func (*ResolveIntentRangeRequest) ProtoMessage()

func (*ResolveIntentRangeRequest) Reset

func (m *ResolveIntentRangeRequest) Reset()

func (*ResolveIntentRangeRequest) ShallowCopy

func (rirr *ResolveIntentRangeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ResolveIntentRangeRequest) Size

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

func (*ResolveIntentRangeRequest) String

func (m *ResolveIntentRangeRequest) String() string

func (*ResolveIntentRangeRequest) Unmarshal

func (m *ResolveIntentRangeRequest) Unmarshal(dAtA []byte) error

type ResolveIntentRangeResponse

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

A ResolveIntentRangeResponse is the return value from the ResolveIntent() method.

func (*ResolveIntentRangeResponse) Descriptor

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

func (*ResolveIntentRangeResponse) Marshal

func (m *ResolveIntentRangeResponse) Marshal() (dAtA []byte, err error)

func (*ResolveIntentRangeResponse) MarshalTo

func (m *ResolveIntentRangeResponse) MarshalTo(dAtA []byte) (int, error)

func (*ResolveIntentRangeResponse) ProtoMessage

func (*ResolveIntentRangeResponse) ProtoMessage()

func (*ResolveIntentRangeResponse) Reset

func (m *ResolveIntentRangeResponse) Reset()

func (*ResolveIntentRangeResponse) Size

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

func (*ResolveIntentRangeResponse) String

func (m *ResolveIntentRangeResponse) String() string

func (*ResolveIntentRangeResponse) Unmarshal

func (m *ResolveIntentRangeResponse) Unmarshal(dAtA []byte) error

type ResolveIntentRequest

type ResolveIntentRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// The transaction whose intent is being resolved.
	IntentTxn cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,2,opt,name=intent_txn,json=intentTxn" json:"intent_txn"`
	// The status of the transaction.
	Status TransactionStatus `protobuf:"varint,3,opt,name=status,enum=cockroach.roachpb.TransactionStatus" json:"status"`
	// Optionally poison the sequence cache for the transaction the intent's
	// range.
	Poison bool `protobuf:"varint,4,opt,name=poison" json:"poison"`
}

A ResolveIntentRequest is arguments to the ResolveIntent() method. It is sent by transaction coordinators after success calling PushTxn to clean up write intents: either to remove, commit or move them forward in time.

func (*ResolveIntentRequest) Descriptor

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

func (*ResolveIntentRequest) Equal added in v1.1.0

func (this *ResolveIntentRequest) Equal(that interface{}) bool

func (*ResolveIntentRequest) Marshal

func (m *ResolveIntentRequest) Marshal() (dAtA []byte, err error)

func (*ResolveIntentRequest) MarshalTo

func (m *ResolveIntentRequest) MarshalTo(dAtA []byte) (int, error)

func (*ResolveIntentRequest) Method

func (*ResolveIntentRequest) Method() Method

Method implements the Request interface.

func (*ResolveIntentRequest) ProtoMessage

func (*ResolveIntentRequest) ProtoMessage()

func (*ResolveIntentRequest) Reset

func (m *ResolveIntentRequest) Reset()

func (*ResolveIntentRequest) ShallowCopy

func (rir *ResolveIntentRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ResolveIntentRequest) Size

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

func (*ResolveIntentRequest) String

func (m *ResolveIntentRequest) String() string

func (*ResolveIntentRequest) Unmarshal

func (m *ResolveIntentRequest) Unmarshal(dAtA []byte) error

type ResolveIntentResponse

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

A ResolveIntentResponse is the return value from the ResolveIntent() method.

func (*ResolveIntentResponse) Descriptor

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

func (*ResolveIntentResponse) Marshal

func (m *ResolveIntentResponse) Marshal() (dAtA []byte, err error)

func (*ResolveIntentResponse) MarshalTo

func (m *ResolveIntentResponse) MarshalTo(dAtA []byte) (int, error)

func (*ResolveIntentResponse) ProtoMessage

func (*ResolveIntentResponse) ProtoMessage()

func (*ResolveIntentResponse) Reset

func (m *ResolveIntentResponse) Reset()

func (*ResolveIntentResponse) Size

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

func (*ResolveIntentResponse) String

func (m *ResolveIntentResponse) String() string

func (*ResolveIntentResponse) Unmarshal

func (m *ResolveIntentResponse) Unmarshal(dAtA []byte) error

type Response

type Response interface {
	proto.Message
	// Header returns the response header.
	Header() ResponseHeader
	// SetHeader sets the response header.
	SetHeader(ResponseHeader)
	// Verify verifies response integrity, as applicable.
	Verify(req Request) error
}

Response is an interface for RPC responses.

type ResponseHeader

type ResponseHeader struct {
	// 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"`
	// The next span to resume from when a bound on the
	// keys is set through max_span_request_keys in the batch header.
	// ResumeSpan is unset when the entire span of keys have been
	// operated on. The span is set to the original span if the request
	// was ignored because max_span_request_keys was hit due to another
	// request in the batch. For a reverse scan the end_key is updated.
	ResumeSpan *Span `protobuf:"bytes,4,opt,name=resume_span,json=resumeSpan" json:"resume_span,omitempty"`
	// The number of keys operated on.
	NumKeys int64 `protobuf:"varint,5,opt,name=num_keys,json=numKeys" json:"num_keys"`
	// Range or list of ranges used to execute the request. Multiple
	// ranges may be returned for Scan, ReverseScan or DeleteRange.
	RangeInfos []RangeInfo `protobuf:"bytes,6,rep,name=range_infos,json=rangeInfos" json:"range_infos"`
}

ResponseHeader is returned with every storage node response.

func (*ResponseHeader) Descriptor

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

func (ResponseHeader) Header

func (rh ResponseHeader) Header() ResponseHeader

Header implements the Response interface for ResponseHeader.

func (*ResponseHeader) Marshal

func (m *ResponseHeader) Marshal() (dAtA []byte, err error)

func (*ResponseHeader) MarshalTo

func (m *ResponseHeader) MarshalTo(dAtA []byte) (int, error)

func (*ResponseHeader) ProtoMessage

func (*ResponseHeader) ProtoMessage()

func (*ResponseHeader) Reset

func (m *ResponseHeader) Reset()

func (*ResponseHeader) SetHeader

func (rh *ResponseHeader) SetHeader(other ResponseHeader)

SetHeader implements the Response interface.

func (*ResponseHeader) Size

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

func (*ResponseHeader) String

func (m *ResponseHeader) String() string

func (*ResponseHeader) Unmarshal

func (m *ResponseHeader) Unmarshal(dAtA []byte) error

func (*ResponseHeader) Verify

func (rh *ResponseHeader) Verify(req Request) error

Verify implements the Response interface for ResopnseHeader with a default noop. Individual response types should override this method if they contain checksummed data which can be verified.

type ResponseUnion

type ResponseUnion struct {
	Get                      *GetResponse                      `protobuf:"bytes,1,opt,name=get" json:"get,omitempty"`
	Put                      *PutResponse                      `protobuf:"bytes,2,opt,name=put" json:"put,omitempty"`
	ConditionalPut           *ConditionalPutResponse           `protobuf:"bytes,3,opt,name=conditional_put,json=conditionalPut" json:"conditional_put,omitempty"`
	Increment                *IncrementResponse                `protobuf:"bytes,4,opt,name=increment" json:"increment,omitempty"`
	Delete                   *DeleteResponse                   `protobuf:"bytes,5,opt,name=delete" json:"delete,omitempty"`
	DeleteRange              *DeleteRangeResponse              `protobuf:"bytes,6,opt,name=delete_range,json=deleteRange" json:"delete_range,omitempty"`
	Scan                     *ScanResponse                     `protobuf:"bytes,7,opt,name=scan" json:"scan,omitempty"`
	BeginTransaction         *BeginTransactionResponse         `protobuf:"bytes,8,opt,name=begin_transaction,json=beginTransaction" json:"begin_transaction,omitempty"`
	EndTransaction           *EndTransactionResponse           `protobuf:"bytes,9,opt,name=end_transaction,json=endTransaction" json:"end_transaction,omitempty"`
	AdminSplit               *AdminSplitResponse               `protobuf:"bytes,10,opt,name=admin_split,json=adminSplit" json:"admin_split,omitempty"`
	AdminMerge               *AdminMergeResponse               `protobuf:"bytes,11,opt,name=admin_merge,json=adminMerge" json:"admin_merge,omitempty"`
	AdminTransferLease       *AdminTransferLeaseResponse       `protobuf:"bytes,29,opt,name=admin_transfer_lease,json=adminTransferLease" json:"admin_transfer_lease,omitempty"`
	AdminChangeReplicas      *AdminChangeReplicasResponse      `protobuf:"bytes,35,opt,name=admin_change_replicas,json=adminChangeReplicas" json:"admin_change_replicas,omitempty"`
	HeartbeatTxn             *HeartbeatTxnResponse             `protobuf:"bytes,12,opt,name=heartbeat_txn,json=heartbeatTxn" json:"heartbeat_txn,omitempty"`
	Gc                       *GCResponse                       `protobuf:"bytes,13,opt,name=gc" json:"gc,omitempty"`
	PushTxn                  *PushTxnResponse                  `protobuf:"bytes,14,opt,name=push_txn,json=pushTxn" json:"push_txn,omitempty"`
	RangeLookup              *RangeLookupResponse              `protobuf:"bytes,15,opt,name=range_lookup,json=rangeLookup" json:"range_lookup,omitempty"`
	ResolveIntent            *ResolveIntentResponse            `protobuf:"bytes,16,opt,name=resolve_intent,json=resolveIntent" json:"resolve_intent,omitempty"`
	ResolveIntentRange       *ResolveIntentRangeResponse       `protobuf:"bytes,17,opt,name=resolve_intent_range,json=resolveIntentRange" json:"resolve_intent_range,omitempty"`
	Merge                    *MergeResponse                    `protobuf:"bytes,18,opt,name=merge" json:"merge,omitempty"`
	TruncateLog              *TruncateLogResponse              `protobuf:"bytes,19,opt,name=truncate_log,json=truncateLog" json:"truncate_log,omitempty"`
	RequestLease             *RequestLeaseResponse             `protobuf:"bytes,20,opt,name=request_lease,json=requestLease" json:"request_lease,omitempty"`
	ReverseScan              *ReverseScanResponse              `protobuf:"bytes,21,opt,name=reverse_scan,json=reverseScan" json:"reverse_scan,omitempty"`
	ComputeChecksum          *ComputeChecksumResponse          `protobuf:"bytes,22,opt,name=compute_checksum,json=computeChecksum" json:"compute_checksum,omitempty"`
	DeprecatedVerifyChecksum *DeprecatedVerifyChecksumResponse `` /* 129-byte string literal not displayed */
	CheckConsistency         *CheckConsistencyResponse         `protobuf:"bytes,24,opt,name=check_consistency,json=checkConsistency" json:"check_consistency,omitempty"`
	Noop                     *NoopResponse                     `protobuf:"bytes,25,opt,name=noop" json:"noop,omitempty"`
	InitPut                  *InitPutResponse                  `protobuf:"bytes,26,opt,name=init_put,json=initPut" json:"init_put,omitempty"`
	LeaseInfo                *LeaseInfoResponse                `protobuf:"bytes,30,opt,name=lease_info,json=leaseInfo" json:"lease_info,omitempty"`
	WriteBatch               *WriteBatchResponse               `protobuf:"bytes,31,opt,name=write_batch,json=writeBatch" json:"write_batch,omitempty"`
	Export                   *ExportResponse                   `protobuf:"bytes,32,opt,name=export" json:"export,omitempty"`
	Import                   *ImportResponse                   `protobuf:"bytes,34,opt,name=import" json:"import,omitempty"`
	QueryTxn                 *QueryTxnResponse                 `protobuf:"bytes,33,opt,name=query_txn,json=queryTxn" json:"query_txn,omitempty"`
	AdminScatter             *AdminScatterResponse             `protobuf:"bytes,36,opt,name=admin_scatter,json=adminScatter" json:"admin_scatter,omitempty"`
	AddSstable               *AddSSTableResponse               `protobuf:"bytes,37,opt,name=add_sstable,json=addSstable" json:"add_sstable,omitempty"`
}

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

WARNING: Do not remove fields from ResponseUnion. Instead, remove all non-header fields from the response message and prepend its name with "Deprecated". See DeprecatedVerifyChecksumResponse for an example.

func (*ResponseUnion) Descriptor

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

func (ResponseUnion) GetInner

func (ru ResponseUnion) GetInner() Response

GetInner returns the Response contained in the union.

func (*ResponseUnion) GetValue

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

func (*ResponseUnion) Marshal

func (m *ResponseUnion) Marshal() (dAtA []byte, err error)

func (*ResponseUnion) MarshalTo

func (m *ResponseUnion) MarshalTo(dAtA []byte) (int, error)

func (*ResponseUnion) MustSetInner

func (ru *ResponseUnion) MustSetInner(reply Response)

MustSetInner sets the Response contained in the union. It panics if the response is not recognized by the union type. The ResponseUnion is reset before being repopulated.

func (*ResponseUnion) ProtoMessage

func (*ResponseUnion) ProtoMessage()

func (*ResponseUnion) Reset

func (m *ResponseUnion) Reset()

func (*ResponseUnion) SetValue

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

func (*ResponseUnion) Size

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

func (*ResponseUnion) String

func (m *ResponseUnion) String() string

func (*ResponseUnion) Unmarshal

func (m *ResponseUnion) Unmarshal(dAtA []byte) error

type ReverseScanRequest

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

A ReverseScanRequest is the argument to the ReverseScan() method. It specifies the start and end keys for a descending scan of [start,end) and the maximum number of results (unbounded if zero).

func (*ReverseScanRequest) Descriptor

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

func (*ReverseScanRequest) Equal added in v1.1.0

func (this *ReverseScanRequest) Equal(that interface{}) bool

func (*ReverseScanRequest) Marshal

func (m *ReverseScanRequest) Marshal() (dAtA []byte, err error)

func (*ReverseScanRequest) MarshalTo

func (m *ReverseScanRequest) MarshalTo(dAtA []byte) (int, error)

func (*ReverseScanRequest) Method

func (*ReverseScanRequest) Method() Method

Method implements the Request interface.

func (*ReverseScanRequest) ProtoMessage

func (*ReverseScanRequest) ProtoMessage()

func (*ReverseScanRequest) Reset

func (m *ReverseScanRequest) Reset()

func (*ReverseScanRequest) ShallowCopy

func (rsr *ReverseScanRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ReverseScanRequest) Size

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

func (*ReverseScanRequest) String

func (m *ReverseScanRequest) String() string

func (*ReverseScanRequest) Unmarshal

func (m *ReverseScanRequest) Unmarshal(dAtA []byte) error

type ReverseScanResponse

type ReverseScanResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Empty if no rows were scanned.
	Rows []KeyValue `protobuf:"bytes,2,rep,name=rows" json:"rows"`
}

A ReverseScanResponse is the return value from the ReverseScan() method.

func (*ReverseScanResponse) Descriptor

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

func (*ReverseScanResponse) Marshal

func (m *ReverseScanResponse) Marshal() (dAtA []byte, err error)

func (*ReverseScanResponse) MarshalTo

func (m *ReverseScanResponse) MarshalTo(dAtA []byte) (int, error)

func (*ReverseScanResponse) ProtoMessage

func (*ReverseScanResponse) ProtoMessage()

func (*ReverseScanResponse) Reset

func (m *ReverseScanResponse) Reset()

func (*ReverseScanResponse) Size

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

func (*ReverseScanResponse) String

func (m *ReverseScanResponse) String() string

func (*ReverseScanResponse) Unmarshal

func (m *ReverseScanResponse) Unmarshal(dAtA []byte) error

func (*ReverseScanResponse) Verify

func (sr *ReverseScanResponse) Verify(req Request) error

Verify verifies the integrity of every value returned in the reverse scan.

type ScanRequest

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

A ScanRequest is the argument to the Scan() method. It specifies the start and end keys for an ascending scan of [start,end) and the maximum number of results (unbounded if zero).

func (*ScanRequest) Descriptor

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

func (*ScanRequest) Equal added in v1.1.0

func (this *ScanRequest) Equal(that interface{}) bool

func (*ScanRequest) Marshal

func (m *ScanRequest) Marshal() (dAtA []byte, err error)

func (*ScanRequest) MarshalTo

func (m *ScanRequest) MarshalTo(dAtA []byte) (int, error)

func (*ScanRequest) Method

func (*ScanRequest) Method() Method

Method implements the Request interface.

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) Reset

func (m *ScanRequest) Reset()

func (*ScanRequest) ShallowCopy

func (sr *ScanRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ScanRequest) Size

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

func (*ScanRequest) String

func (m *ScanRequest) String() string

func (*ScanRequest) Unmarshal

func (m *ScanRequest) Unmarshal(dAtA []byte) error

type ScanResponse

type ScanResponse struct {
	ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Empty if no rows were scanned.
	Rows []KeyValue `protobuf:"bytes,2,rep,name=rows" json:"rows"`
}

A ScanResponse is the return value from the Scan() method.

func (*ScanResponse) Descriptor

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

func (*ScanResponse) Marshal

func (m *ScanResponse) Marshal() (dAtA []byte, err error)

func (*ScanResponse) MarshalTo

func (m *ScanResponse) MarshalTo(dAtA []byte) (int, error)

func (*ScanResponse) ProtoMessage

func (*ScanResponse) ProtoMessage()

func (*ScanResponse) Reset

func (m *ScanResponse) Reset()

func (*ScanResponse) Size

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

func (*ScanResponse) String

func (m *ScanResponse) String() string

func (*ScanResponse) Unmarshal

func (m *ScanResponse) Unmarshal(dAtA []byte) error

func (*ScanResponse) Verify

func (sr *ScanResponse) Verify(req Request) error

Verify verifies the integrity of every value returned in the scan.

type SendError

type SendError struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message"`
}

A SendError indicates that a message could not be delivered to the desired recipient(s).

func NewSendError

func NewSendError(msg string) *SendError

NewSendError creates a SendError.

func (*SendError) Descriptor

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

func (*SendError) Equal added in v1.1.0

func (this *SendError) Equal(that interface{}) bool

func (SendError) Error

func (s SendError) Error() string

func (*SendError) Marshal

func (m *SendError) Marshal() (dAtA []byte, err error)

func (*SendError) MarshalTo

func (m *SendError) MarshalTo(dAtA []byte) (int, error)

func (*SendError) ProtoMessage

func (*SendError) ProtoMessage()

func (*SendError) Reset

func (m *SendError) Reset()

func (*SendError) Size

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

func (*SendError) String

func (m *SendError) String() string

func (*SendError) Unmarshal

func (m *SendError) Unmarshal(dAtA []byte) error

type Span

type Span struct {
	// The key for request. If the request operates on a range, this
	// represents the starting key for the range.
	Key Key `protobuf:"bytes,3,opt,name=key,casttype=Key" json:"key,omitempty"`
	// The end key is empty if the request spans only a single key. Otherwise,
	// it must order strictly after Key. In such a case, the header indicates
	// that the operation takes place on the key range from Key to EndKey,
	// including Key and excluding EndKey.
	EndKey Key `protobuf:"bytes,4,opt,name=end_key,json=endKey,casttype=Key" json:"end_key,omitempty"`
}

Span is supplied with every storage node request.

func MergeSpans

func MergeSpans(spans []Span) ([]Span, bool)

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

func NewPopulatedSpan

func NewPopulatedSpan(r randyData, easy bool) *Span

func (Span) AsRange

func (s Span) AsRange() interval.Range

AsRange returns the Span as an interval.Range.

func (Span) Contains

func (s Span) Contains(o Span) bool

Contains returns whether the receiver contains the given span.

func (*Span) Descriptor

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

func (*Span) Equal

func (this *Span) Equal(that interface{}) bool

func (Span) EqualValue added in v1.1.0

func (s Span) EqualValue(o Span) bool

EqualValue compares for equality.

func (Span) Header

func (rh Span) Header() Span

Header implements the Request interface.

func (*Span) Marshal

func (m *Span) Marshal() (dAtA []byte, err error)

func (*Span) MarshalTo

func (m *Span) MarshalTo(dAtA []byte) (int, error)

func (Span) Overlaps

func (s Span) Overlaps(o Span) bool

Overlaps returns whether the two spans overlap.

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) Reset

func (m *Span) Reset()

func (*Span) SetHeader

func (rh *Span) SetHeader(other Span)

SetHeader implements the Request interface.

func (*Span) Size

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

func (Span) String

func (s Span) String() string

func (*Span) Unmarshal

func (m *Span) Unmarshal(dAtA []byte) error

type Spans

type Spans []Span

Spans is a slice of spans.

func (Spans) Len

func (a Spans) Len() int

implement Sort.Interface

func (Spans) Less

func (a Spans) Less(i, j int) bool

func (Spans) Swap

func (a Spans) Swap(i, j int)

type SplitTrigger

type SplitTrigger 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 SplitTrigger is run after a successful commit of an AdminSplit command. It provides the updated left hand side of the split's range descriptor (left_desc) and the new range descriptor covering the right hand side of the split (right_desc). This information allows the final bookkeeping for the split to be completed and the new range put into operation.

func (*SplitTrigger) Descriptor

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

func (*SplitTrigger) Equal added in v1.1.0

func (this *SplitTrigger) Equal(that interface{}) bool

func (*SplitTrigger) Marshal

func (m *SplitTrigger) Marshal() (dAtA []byte, err error)

func (*SplitTrigger) MarshalTo

func (m *SplitTrigger) MarshalTo(dAtA []byte) (int, error)

func (*SplitTrigger) ProtoMessage

func (*SplitTrigger) ProtoMessage()

func (*SplitTrigger) Reset

func (m *SplitTrigger) Reset()

func (*SplitTrigger) Size

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

func (*SplitTrigger) String

func (m *SplitTrigger) String() string

func (*SplitTrigger) Unmarshal

func (m *SplitTrigger) Unmarshal(dAtA []byte) error

type StatementStatistics

type StatementStatistics struct {
	// Count is the total number of times this statement was executed
	// since the begin of the reporting period.
	Count int64 `protobuf:"varint,1,opt,name=count" json:"count"`
	// FirstAttemptCount collects the total number of times a first
	// attempt was executed (either the one time in explicitly committed
	// statements, or the first time in implicitly committed statements
	// with implicit retries).
	// The proportion of statements that could be executed without retry
	// can be computed as FirstAttemptCount / Count.
	// The cumulative number of retries can be computed with
	// Count - FirstAttemptCount.
	FirstAttemptCount int64 `protobuf:"varint,2,opt,name=first_attempt_count,json=firstAttemptCount" json:"first_attempt_count"`
	// MaxRetries collects the maximum observed number of automatic
	// retries in the reporting period.
	MaxRetries int64 `protobuf:"varint,3,opt,name=max_retries,json=maxRetries" json:"max_retries"`
	// LastErr collects the last error encountered.
	LastErr string `protobuf:"bytes,4,opt,name=last_err,json=lastErr" json:"last_err"`
	// NumRows collects the number of rows returned or observed.
	NumRows NumericStat `protobuf:"bytes,5,opt,name=num_rows,json=numRows" json:"num_rows"`
	// ParseLat is the time to transform the SQL string into an AST.
	ParseLat NumericStat `protobuf:"bytes,6,opt,name=parse_lat,json=parseLat" json:"parse_lat"`
	// PlanLat is the time to transform the AST into a logical query plan.
	PlanLat NumericStat `protobuf:"bytes,7,opt,name=plan_lat,json=planLat" json:"plan_lat"`
	// RunLat is the time to run the query and fetch/compute the result rows.
	RunLat NumericStat `protobuf:"bytes,8,opt,name=run_lat,json=runLat" json:"run_lat"`
	// ServiceLat is the time to service the query, from start of parse to end of execute.
	ServiceLat NumericStat `protobuf:"bytes,9,opt,name=service_lat,json=serviceLat" json:"service_lat"`
	// OverheadLat is the difference between ServiceLat and the sum of parse+plan+run latencies.
	// We store it separately (as opposed to computing it post-hoc) because the combined
	// variance for the overhead cannot be derived from the variance of the separate latencies.
	OverheadLat NumericStat `protobuf:"bytes,10,opt,name=overhead_lat,json=overheadLat" json:"overhead_lat"`
}

func (*StatementStatistics) Descriptor

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

func (*StatementStatistics) Marshal

func (m *StatementStatistics) Marshal() (dAtA []byte, err error)

func (*StatementStatistics) MarshalTo

func (m *StatementStatistics) MarshalTo(dAtA []byte) (int, error)

func (*StatementStatistics) ProtoMessage

func (*StatementStatistics) ProtoMessage()

func (*StatementStatistics) Reset

func (m *StatementStatistics) Reset()

func (*StatementStatistics) Size

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

func (*StatementStatistics) String

func (m *StatementStatistics) String() string

func (*StatementStatistics) Unmarshal

func (m *StatementStatistics) Unmarshal(dAtA []byte) error

type StatementStatisticsKey added in v1.1.0

type StatementStatisticsKey struct {
	Query   string `protobuf:"bytes,1,opt,name=query" json:"query"`
	App     string `protobuf:"bytes,2,opt,name=app" json:"app"`
	DistSQL bool   `protobuf:"varint,3,opt,name=distSQL" json:"distSQL"`
	Failed  bool   `protobuf:"varint,4,opt,name=failed" json:"failed"`
}

func (*StatementStatisticsKey) Descriptor added in v1.1.0

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

func (*StatementStatisticsKey) Marshal added in v1.1.0

func (m *StatementStatisticsKey) Marshal() (dAtA []byte, err error)

func (*StatementStatisticsKey) MarshalTo added in v1.1.0

func (m *StatementStatisticsKey) MarshalTo(dAtA []byte) (int, error)

func (*StatementStatisticsKey) ProtoMessage added in v1.1.0

func (*StatementStatisticsKey) ProtoMessage()

func (*StatementStatisticsKey) Reset added in v1.1.0

func (m *StatementStatisticsKey) Reset()

func (*StatementStatisticsKey) Size added in v1.1.0

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

func (*StatementStatisticsKey) String added in v1.1.0

func (m *StatementStatisticsKey) String() string

func (*StatementStatisticsKey) Unmarshal added in v1.1.0

func (m *StatementStatisticsKey) Unmarshal(dAtA []byte) error

type StoreCapacity

type StoreCapacity struct {
	// Total capacity of the disk used by the store, including space used by the
	// operating system and other applications.
	Capacity int64 `protobuf:"varint,1,opt,name=capacity" json:"capacity"`
	// Available space remaining on the disk used by the store.
	Available int64 `protobuf:"varint,2,opt,name=available" json:"available"`
	// Amount of disk space used by the data in the CockroachDB store. Note that
	// this is going to be less than (capacity - available), because those two
	// fields consider the entire disk and everything on it, while this only
	// tracks the store's disk usage.
	Used int64 `protobuf:"varint,8,opt,name=used" json:"used"`
	// Amount of logical bytes stored in the store, ignoring RocksDB space
	// overhead. Useful for rebalancing so that moving a replica from one store
	// to another actually removes its bytes from the source store even though
	// RocksDB may not actually reclaim the physical disk space for a while.
	LogicalBytes int64 `protobuf:"varint,9,opt,name=logical_bytes,json=logicalBytes" json:"logical_bytes"`
	RangeCount   int32 `protobuf:"varint,3,opt,name=range_count,json=rangeCount" json:"range_count"`
	LeaseCount   int32 `protobuf:"varint,4,opt,name=lease_count,json=leaseCount" json:"lease_count"`
	// writes_per_second tracks the average number of keys written per second
	// by ranges in the store. The stat is tracked over the time period defined
	// in storage/replica_stats.go, which as of June 2017 is 25 minutes.
	// TODO(a-robinson): We can currently only include writes, not reads served
	// by leaseholders. Should we record those too? This may be enabled by #7611.
	WritesPerSecond float64 `protobuf:"fixed64,5,opt,name=writes_per_second,json=writesPerSecond" json:"writes_per_second"`
	// bytes_per_replica and writes_per_replica contain percentiles for the
	// number of bytes and writes-per-second to each replica in the store.
	// This information can be used for rebalancing decisions.
	BytesPerReplica  Percentiles `protobuf:"bytes,6,opt,name=bytes_per_replica,json=bytesPerReplica" json:"bytes_per_replica"`
	WritesPerReplica Percentiles `protobuf:"bytes,7,opt,name=writes_per_replica,json=writesPerReplica" json:"writes_per_replica"`
}

StoreCapacity contains capacity information for a storage device.

func (*StoreCapacity) Descriptor

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

func (StoreCapacity) FractionUsed

func (sc StoreCapacity) FractionUsed() float64

FractionUsed computes the fraction of storage capacity that is in use.

func (*StoreCapacity) Marshal

func (m *StoreCapacity) Marshal() (dAtA []byte, err error)

func (*StoreCapacity) MarshalTo

func (m *StoreCapacity) MarshalTo(dAtA []byte) (int, error)

func (*StoreCapacity) ProtoMessage

func (*StoreCapacity) ProtoMessage()

func (*StoreCapacity) Reset

func (m *StoreCapacity) Reset()

func (*StoreCapacity) Size

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

func (StoreCapacity) String

func (sc StoreCapacity) String() string

String returns a string representation of the StoreCapacity.

func (*StoreCapacity) Unmarshal

func (m *StoreCapacity) Unmarshal(dAtA []byte) error

type StoreDeadReplicas

type StoreDeadReplicas struct {
	StoreID  StoreID        `protobuf:"varint,1,opt,name=store_id,json=storeId,casttype=StoreID" json:"store_id"`
	Replicas []ReplicaIdent `protobuf:"bytes,2,rep,name=replicas" json:"replicas"`
}

StoreDeadReplicas holds a storeID and a list of dead replicas on that store. Used to let the range lease holder know about corrupted or otherwise destroyed replicas that should be transferred to a different store.

func (*StoreDeadReplicas) Descriptor

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

func (*StoreDeadReplicas) Marshal

func (m *StoreDeadReplicas) Marshal() (dAtA []byte, err error)

func (*StoreDeadReplicas) MarshalTo

func (m *StoreDeadReplicas) MarshalTo(dAtA []byte) (int, error)

func (*StoreDeadReplicas) ProtoMessage

func (*StoreDeadReplicas) ProtoMessage()

func (*StoreDeadReplicas) Reset

func (m *StoreDeadReplicas) Reset()

func (*StoreDeadReplicas) Size

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

func (*StoreDeadReplicas) String

func (m *StoreDeadReplicas) String() string

func (*StoreDeadReplicas) Unmarshal

func (m *StoreDeadReplicas) Unmarshal(dAtA []byte) error

type StoreDescriptor

type StoreDescriptor struct {
	StoreID  StoreID        `protobuf:"varint,1,opt,name=store_id,json=storeId,casttype=StoreID" json:"store_id"`
	Attrs    Attributes     `protobuf:"bytes,2,opt,name=attrs" json:"attrs"`
	Node     NodeDescriptor `protobuf:"bytes,3,opt,name=node" json:"node"`
	Capacity StoreCapacity  `protobuf:"bytes,4,opt,name=capacity" json:"capacity"`
}

StoreDescriptor holds store information including store attributes, node descriptor and store capacity.

func (*StoreDescriptor) Descriptor

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

func (*StoreDescriptor) Marshal

func (m *StoreDescriptor) Marshal() (dAtA []byte, err error)

func (*StoreDescriptor) MarshalTo

func (m *StoreDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*StoreDescriptor) ProtoMessage

func (*StoreDescriptor) ProtoMessage()

func (*StoreDescriptor) Reset

func (m *StoreDescriptor) Reset()

func (*StoreDescriptor) Size

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

func (*StoreDescriptor) String

func (m *StoreDescriptor) String() string

func (*StoreDescriptor) Unmarshal

func (m *StoreDescriptor) Unmarshal(dAtA []byte) error

type StoreID

type StoreID int32

StoreID is a custom type for a cockroach store ID.

func (StoreID) String

func (n StoreID) String() string

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

type StoreIDSlice

type StoreIDSlice []StoreID

StoreIDSlice implements sort.Interface.

func (StoreIDSlice) Len

func (s StoreIDSlice) Len() int

func (StoreIDSlice) Less

func (s StoreIDSlice) Less(i, j int) bool

func (StoreIDSlice) Swap

func (s StoreIDSlice) Swap(i, j int)

type StoreIdent

type StoreIdent struct {
	ClusterID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `` /* 134-byte string literal not displayed */
	NodeID    NodeID                                              `protobuf:"varint,2,opt,name=node_id,json=nodeId,casttype=NodeID" json:"node_id"`
	StoreID   StoreID                                             `protobuf:"varint,3,opt,name=store_id,json=storeId,casttype=StoreID" json:"store_id"`
}

A StoreIdent uniquely identifies a store in the cluster. The StoreIdent is written to the underlying storage engine at a store-reserved system key (KeyLocalIdent).

func (*StoreIdent) Descriptor

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

func (*StoreIdent) Marshal

func (m *StoreIdent) Marshal() (dAtA []byte, err error)

func (*StoreIdent) MarshalTo

func (m *StoreIdent) MarshalTo(dAtA []byte) (int, error)

func (*StoreIdent) ProtoMessage

func (*StoreIdent) ProtoMessage()

func (*StoreIdent) Reset

func (m *StoreIdent) Reset()

func (*StoreIdent) Size

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

func (*StoreIdent) String

func (m *StoreIdent) String() string

func (*StoreIdent) Unmarshal

func (m *StoreIdent) Unmarshal(dAtA []byte) error

type StoreNotFoundError

type StoreNotFoundError struct {
	StoreID StoreID `protobuf:"varint,1,opt,name=store_id,json=storeId,casttype=StoreID" json:"store_id"`
}

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

func NewStoreNotFoundError

func NewStoreNotFoundError(storeID StoreID) *StoreNotFoundError

NewStoreNotFoundError initializes a new StoreNotFoundError.

func (*StoreNotFoundError) Descriptor

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

func (*StoreNotFoundError) Equal added in v1.1.0

func (this *StoreNotFoundError) Equal(that interface{}) bool

func (*StoreNotFoundError) Error

func (e *StoreNotFoundError) Error() string

func (*StoreNotFoundError) Marshal

func (m *StoreNotFoundError) Marshal() (dAtA []byte, err error)

func (*StoreNotFoundError) MarshalTo

func (m *StoreNotFoundError) MarshalTo(dAtA []byte) (int, error)

func (*StoreNotFoundError) ProtoMessage

func (*StoreNotFoundError) ProtoMessage()

func (*StoreNotFoundError) Reset

func (m *StoreNotFoundError) Reset()

func (*StoreNotFoundError) Size

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

func (*StoreNotFoundError) String

func (m *StoreNotFoundError) String() string

func (*StoreNotFoundError) Unmarshal

func (m *StoreNotFoundError) Unmarshal(dAtA []byte) error

type Tier

type Tier struct {
	// Key is the name of tier and should match all other nodes.
	Key string `protobuf:"bytes,1,opt,name=key" json:"key"`
	// Value is node specific value corresponding to the key.
	Value string `protobuf:"bytes,2,opt,name=value" json:"value"`
}

Tier represents one level of the locality hierarchy.

func (*Tier) Descriptor

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

func (*Tier) FromString

func (t *Tier) FromString(tier string) error

FromString parses the string representation into the Tier.

func (*Tier) Marshal

func (m *Tier) Marshal() (dAtA []byte, err error)

func (*Tier) MarshalTo

func (m *Tier) MarshalTo(dAtA []byte) (int, error)

func (*Tier) ProtoMessage

func (*Tier) ProtoMessage()

func (*Tier) Reset

func (m *Tier) Reset()

func (*Tier) Size

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

func (Tier) String

func (t Tier) String() string

String returns a string representation of the Tier.

func (*Tier) Unmarshal

func (m *Tier) Unmarshal(dAtA []byte) error

type Transaction

type Transaction struct {
	// The transaction metadata. These are persisted with every intent.
	cockroach_storage_engine_enginepb.TxnMeta `protobuf:"bytes,1,opt,name=meta,embedded=meta" json:"meta"`
	// A free-text identifier for debug purposes.
	Name          string                       `protobuf:"bytes,2,opt,name=name" json:"name"`
	Status        TransactionStatus            `protobuf:"varint,4,opt,name=status,enum=cockroach.roachpb.TransactionStatus" json:"status"`
	LastHeartbeat cockroach_util_hlc.Timestamp `protobuf:"bytes,5,opt,name=last_heartbeat,json=lastHeartbeat" json:"last_heartbeat"`
	// The original timestamp at which the transaction started. For serializable
	// transactions, if the timestamp drifts from the original timestamp, the
	// transaction will retry.
	//
	// This timestamp is the one at which all transactions will read. It is also,
	// surprisingly, the timestamp at which transactions will provisionally
	// _write_ (i.e. intents are written at this orig_timestamp and, after commit,
	// when the intents are resolved, their timestamps are bumped to the to the
	// commit timestamp).
	// This is ultimately because of correctness concerns around SNAPSHOT
	// transactions.  Note first that for SERIALIZABLE transactions, the original
	// and commit timestamps must not diverge, and so an intent which may be
	// committed is always written when both timestamps coincide.
	//
	// For a SNAPSHOT transaction however, this is not the case. Intuitively,
	// one could think that the timestamp at which intents should be written
	// should be the provisional commit timestamp, and while this is morally
	// true, consider the following scenario, where txn1 is a SNAPSHOT txn:
	//
	// - txn1 at orig_timestamp=5 reads key1: (value) 1.
	// - txn1 writes elsewhere, has its commit timestamp increased to 20.
	// - txn2 at orig_timestamp=10 reads key1: 1
	// - txn2 increases the value by 5: key1: 6 and commits
	// - txn1 increases the value by 1: key1: 2, attempts commit
	//
	// If txn1 uses its orig_timestamp for updating key1 (as it does), it
	// conflicts with txn2's committed value (which is at timestamp 10, in the
	// future of 5), and restarts.
	// Using instead its candidate commit timestamp, it wouldn't see a conflict
	// and commit, but this is not the expected outcome (the expected outcome is
	// {key1: 6} (since txn2 is not expected to commit)) and we would be
	// experiencing the Lost Update Anomaly.
	//
	// Note that in practice, before restarting, txn1 would still lay down an
	// intent (just above the committed value) not with the intent to commit it,
	// but to avoid being starved by short-lived transactions on that key which
	// would otherwise not have to go through conflict resolution with txn1.
	//
	// Again, keep in mind that, when the transaction commits, all the intents are
	// bumped to the commit timestamp (otherwise, pushing a transaction wouldn't
	// achieve anything).
	OrigTimestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,6,opt,name=orig_timestamp,json=origTimestamp" json:"orig_timestamp"`
	// Initial Timestamp + clock skew. Reads which encounter values with
	// timestamps between timestamp and max_timestamp trigger a txn
	// retry error, unless the node being read is listed in observed_timestamps
	// (in which case no more read uncertainty can occur).
	// The case max_timestamp < timestamp is possible for transactions which have
	// been pushed; in this case, max_timestamp should be ignored.
	MaxTimestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,7,opt,name=max_timestamp,json=maxTimestamp" json:"max_timestamp"`
	// A list of <NodeID, timestamp> pairs. The list maps NodeIDs to timestamps
	// as observed from their local clock during this transaction. The purpose of
	// this map is to avoid uncertainty related restarts which normally occur
	// when reading a value in the near future as per the max_timestamp field.
	//
	// When this list holds a corresponding entry for the node the current
	// request is executing on, we can run the command with the map's timestamp
	// as the top boundary of our uncertainty interval, limiting (and often
	// avoiding) uncertainty restarts.
	//
	// The list of observed timestamps is kept sorted by NodeID. Use
	// Transaction.UpdateObservedTimestamp to maintain the sorted order.
	ObservedTimestamps []ObservedTimestamp `protobuf:"bytes,8,rep,name=observed_timestamps,json=observedTimestamps" json:"observed_timestamps"`
	// Writing is true if the transaction has previously executed a successful
	// write request, i.e. a request that may have left intents (across retries).
	Writing bool `protobuf:"varint,9,opt,name=writing" json:"writing"`
	// If this is true, the transaction must retry. Relevant only for
	// SNAPSHOT transactions: a SERIALIZABLE transaction would have to
	// retry anyway due to its commit timestamp having moved forward.
	// This bool is set instead of immediately returning a txn retry
	// error so that intents can continue to be laid down, minimizing
	// work required on txn restart.
	WriteTooOld bool `protobuf:"varint,12,opt,name=write_too_old,json=writeTooOld" json:"write_too_old"`
	// If retry_on_push is true, the transaction must retry in the event
	// that the commit timestamp is pushed forward. This flag is set if
	// the transaction contains any calls to DeleteRange, in order to
	// prevent the LostDeleteRange anomaly. This flag is relevant only
	// for SNAPSHOT transactions.
	RetryOnPush bool   `protobuf:"varint,13,opt,name=retry_on_push,json=retryOnPush" json:"retry_on_push"`
	Intents     []Span `protobuf:"bytes,11,rep,name=intents" json:"intents"`
}

A Transaction is a unit of work performed on the database. Cockroach transactions support two isolation levels: snapshot isolation and serializable snapshot isolation. Each Cockroach transaction is assigned a random priority. This priority will be used to decide whether a transaction will be aborted during contention.

If you add fields to Transaction you'll need to update Transaction.Clone. Failure to do so will result in test failures.

func MakeTransaction added in v1.1.0

func MakeTransaction(
	name string,
	baseKey Key,
	userPriority UserPriority,
	isolation enginepb.IsolationType,
	now hlc.Timestamp,
	maxOffsetNs int64,
) Transaction

MakeTransaction creates a new transaction. The transaction key is composed using the specified baseKey (for locality with data affected by the transaction) and a random ID to guarantee uniqueness. The specified user-level priority is combined with a randomly chosen value to yield a final priority, used to settle write conflicts in a way that avoids starvation of long-running transactions (see Replica.PushTxn).

baseKey can be nil, in which case it will be set when sending the first write.

func NewPopulatedTransaction

func NewPopulatedTransaction(r randyData, easy bool) *Transaction

func PrepareTransactionForRetry

func PrepareTransactionForRetry(
	ctx context.Context, pErr *Error, pri UserPriority, clock *hlc.Clock,
) Transaction

PrepareTransactionForRetry returns a new Transaction to be used for retrying the original Transaction. Depending on the error, this might return an already-existing Transaction with an incremented epoch, or a completely new Transaction.

The caller should generally check that the error was meant for this Transaction before calling this.

pri is the priority that should be used when giving the restarted transaction the chance to get a higher priority. Not used when the transaction is being aborted.

In case retryErr tells us that a new Transaction needs to be created, isolation and name help initialize this new transaction.

func (*Transaction) AssertInitialized added in v1.1.0

func (t *Transaction) AssertInitialized(ctx context.Context)

AssertInitialized crashes if the transaction is not initialized.

func (*Transaction) BumpEpoch added in v1.1.0

func (t *Transaction) BumpEpoch()

BumpEpoch increments the transaction's epoch, allowing for an in-place restart. This invalidates all write intents previously written at lower epochs.

func (Transaction) Clone

func (t Transaction) Clone() Transaction

Clone creates a copy of the given transaction. The copy is "mostly" deep, but does share pieces of memory with the original such as Key, ID and the keys with the intent spans.

func (*Transaction) Descriptor

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

func (*Transaction) Equal

func (this *Transaction) Equal(that interface{}) bool

func (Transaction) GetObservedTimestamp

func (t Transaction) GetObservedTimestamp(nodeID NodeID) (hlc.Timestamp, bool)

GetObservedTimestamp returns the lowest HLC timestamp recorded from the given node's clock during the transaction. The returned boolean is false if no observation about the requested node was found. Otherwise, MaxTimestamp can be lowered to the returned timestamp when reading from nodeID.

func (Transaction) LastActive

func (t Transaction) LastActive() hlc.Timestamp

LastActive returns the last timestamp at which client activity definitely occurred, i.e. the maximum of OrigTimestamp and LastHeartbeat.

func (*Transaction) Marshal

func (m *Transaction) Marshal() (dAtA []byte, err error)

func (*Transaction) MarshalTo

func (m *Transaction) MarshalTo(dAtA []byte) (int, error)

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) ResetObservedTimestamps

func (t *Transaction) ResetObservedTimestamps()

ResetObservedTimestamps clears out all timestamps recorded from individual nodes.

func (*Transaction) Restart

func (t *Transaction) Restart(
	userPriority UserPriority, upgradePriority int32, timestamp hlc.Timestamp,
)

Restart reconfigures a transaction for restart. The epoch is incremented for an in-place restart. The timestamp of the transaction on restart is set to the maximum of the transaction's timestamp and the specified timestamp.

func (*Transaction) Size

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

func (Transaction) String

func (t Transaction) String() string

String formats transaction into human readable string.

func (*Transaction) Unmarshal

func (m *Transaction) Unmarshal(dAtA []byte) error

func (*Transaction) Update

func (t *Transaction) Update(o *Transaction)

Update ratchets priority, timestamp and original timestamp values (among others) for the transaction. If t.ID is empty, then the transaction is copied from o.

func (*Transaction) UpdateObservedTimestamp

func (t *Transaction) UpdateObservedTimestamp(nodeID NodeID, maxTS hlc.Timestamp)

UpdateObservedTimestamp stores a timestamp off a node's clock for future operations in the transaction. When multiple calls are made for a single nodeID, the lowest timestamp prevails.

func (*Transaction) UpgradePriority

func (t *Transaction) UpgradePriority(minPriority int32)

UpgradePriority sets transaction priority to the maximum of current priority and the specified minPriority. The exception is if the current priority is set to the minimum, in which case the minimum is preserved.

type TransactionAbortedError

type TransactionAbortedError struct {
}

A TransactionAbortedError indicates that the transaction was aborted by another concurrent transaction. Upon seeing this error, the client is supposed to reset its Transaction proto and try the transaction again.

In contrast with other errors, the Transaction that the client gets in the pErr carrying this ErrorDetail is not supposed to be used by the client, besides checking that the transaction's ID is right.

func NewTransactionAbortedError

func NewTransactionAbortedError() *TransactionAbortedError

NewTransactionAbortedError initializes a new TransactionAbortedError.

func (*TransactionAbortedError) Descriptor

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

func (*TransactionAbortedError) Equal added in v1.1.0

func (this *TransactionAbortedError) Equal(that interface{}) bool

func (*TransactionAbortedError) Error

func (e *TransactionAbortedError) Error() string

func (*TransactionAbortedError) Marshal

func (m *TransactionAbortedError) Marshal() (dAtA []byte, err error)

func (*TransactionAbortedError) MarshalTo

func (m *TransactionAbortedError) MarshalTo(dAtA []byte) (int, error)

func (*TransactionAbortedError) ProtoMessage

func (*TransactionAbortedError) ProtoMessage()

func (*TransactionAbortedError) Reset

func (m *TransactionAbortedError) Reset()

func (*TransactionAbortedError) Size

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

func (*TransactionAbortedError) String

func (m *TransactionAbortedError) String() string

func (*TransactionAbortedError) Unmarshal

func (m *TransactionAbortedError) Unmarshal(dAtA []byte) error

type TransactionPushError

type TransactionPushError struct {
	PusheeTxn Transaction `protobuf:"bytes,1,opt,name=pushee_txn,json=pusheeTxn" json:"pushee_txn"`
}

A TransactionPushError indicates that the transaction could not continue because it encountered a write intent from another transaction which it was unable to push.

func NewTransactionPushError

func NewTransactionPushError(pusheeTxn Transaction) *TransactionPushError

NewTransactionPushError initializes a new TransactionPushError. The argument is copied.

func (*TransactionPushError) Descriptor

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

func (*TransactionPushError) Equal added in v1.1.0

func (this *TransactionPushError) Equal(that interface{}) bool

func (*TransactionPushError) Error

func (e *TransactionPushError) Error() string

func (*TransactionPushError) Marshal

func (m *TransactionPushError) Marshal() (dAtA []byte, err error)

func (*TransactionPushError) MarshalTo

func (m *TransactionPushError) MarshalTo(dAtA []byte) (int, error)

func (*TransactionPushError) ProtoMessage

func (*TransactionPushError) ProtoMessage()

func (*TransactionPushError) Reset

func (m *TransactionPushError) Reset()

func (*TransactionPushError) Size

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

func (*TransactionPushError) String

func (m *TransactionPushError) String() string

func (*TransactionPushError) Unmarshal

func (m *TransactionPushError) Unmarshal(dAtA []byte) error

type TransactionReplayError

type TransactionReplayError struct {
}

A TransactionReplayError indicates that a BeginTransaction request is being replayed. This can happen on network replays in which a BeginTransaction request is sent again either from the client or is belatedly delivered after an earlier attempt succeeded.

func NewTransactionReplayError

func NewTransactionReplayError() *TransactionReplayError

NewTransactionReplayError initializes a new TransactionReplayError.

func (*TransactionReplayError) Descriptor

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

func (*TransactionReplayError) Equal added in v1.1.0

func (this *TransactionReplayError) Equal(that interface{}) bool

func (*TransactionReplayError) Error

func (e *TransactionReplayError) Error() string

func (*TransactionReplayError) Marshal

func (m *TransactionReplayError) Marshal() (dAtA []byte, err error)

func (*TransactionReplayError) MarshalTo

func (m *TransactionReplayError) MarshalTo(dAtA []byte) (int, error)

func (*TransactionReplayError) ProtoMessage

func (*TransactionReplayError) ProtoMessage()

func (*TransactionReplayError) Reset

func (m *TransactionReplayError) Reset()

func (*TransactionReplayError) Size

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

func (*TransactionReplayError) String

func (m *TransactionReplayError) String() string

func (*TransactionReplayError) Unmarshal

func (m *TransactionReplayError) Unmarshal(dAtA []byte) error

type TransactionRestart

type TransactionRestart int32

TransactionRestart indicates how an error should be handled in a transactional context.

const (
	//  NONE (the default) is used for errors which have no effect on the
	//  transaction state. That is, a transactional operation which receives such
	//  an error is still PENDING and does not need to restart (at least not as a
	//  result of the error). Examples are a CPut whose condition wasn't met, or
	//  a spurious RPC error.
	TransactionRestart_NONE TransactionRestart = 0
	// BACKOFF is for errors that can retried by restarting the transaction
	// after an exponential backoff.
	// Note: Deprecated.
	TransactionRestart_BACKOFF TransactionRestart = 1
	// IMMEDIATE is for errors that can be retried by restarting the
	// transaction immediately.
	TransactionRestart_IMMEDIATE TransactionRestart = 2
)

func (TransactionRestart) Enum

func (TransactionRestart) EnumDescriptor

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

func (TransactionRestart) String

func (x TransactionRestart) String() string

func (*TransactionRestart) UnmarshalJSON

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

type TransactionRetryError

type TransactionRetryError struct {
	Reason TransactionRetryReason `protobuf:"varint,1,opt,name=reason,enum=cockroach.roachpb.TransactionRetryReason" json:"reason"`
}

A TransactionRetryError indicates that the transaction must be retried, usually with an increased transaction timestamp.

func NewTransactionRetryError

func NewTransactionRetryError(reason TransactionRetryReason) *TransactionRetryError

NewTransactionRetryError initializes a new TransactionRetryError.

func (*TransactionRetryError) Descriptor

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

func (*TransactionRetryError) Equal added in v1.1.0

func (this *TransactionRetryError) Equal(that interface{}) bool

func (*TransactionRetryError) Error

func (e *TransactionRetryError) Error() string

func (*TransactionRetryError) Marshal

func (m *TransactionRetryError) Marshal() (dAtA []byte, err error)

func (*TransactionRetryError) MarshalTo

func (m *TransactionRetryError) MarshalTo(dAtA []byte) (int, error)

func (*TransactionRetryError) ProtoMessage

func (*TransactionRetryError) ProtoMessage()

func (*TransactionRetryError) Reset

func (m *TransactionRetryError) Reset()

func (*TransactionRetryError) Size

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

func (*TransactionRetryError) String

func (m *TransactionRetryError) String() string

func (*TransactionRetryError) Unmarshal

func (m *TransactionRetryError) Unmarshal(dAtA []byte) error

type TransactionRetryReason

type TransactionRetryReason int32

TransactionRetryReason specifies what caused a transaction retry.

const (
	// For backwards compatibility.
	RETRY_REASON_UNKNOWN TransactionRetryReason = 0
	// A concurrent writer finished first, causing restart.
	RETRY_WRITE_TOO_OLD TransactionRetryReason = 1
	// A transaction containing a delete range command had its timestamp
	// moved forward.
	RETRY_DELETE_RANGE TransactionRetryReason = 2
	// A SERIALIZABLE transaction had its timestamp moved forward.
	RETRY_SERIALIZABLE TransactionRetryReason = 3
	// A possible replay caused by duplicate begin txn or out-of-order
	// txn sequence number.
	RETRY_POSSIBLE_REPLAY TransactionRetryReason = 4
)

func (TransactionRetryReason) Enum

func (TransactionRetryReason) EnumDescriptor

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

func (TransactionRetryReason) String

func (x TransactionRetryReason) String() string

func (*TransactionRetryReason) UnmarshalJSON

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

type TransactionStatus

type TransactionStatus int32

TransactionStatus specifies possible states for a transaction.

const (
	// PENDING is the default state for a new transaction. Transactions
	// move from PENDING to one of COMMITTED or ABORTED. Mutations made
	// as part of a PENDING transactions are recorded as "intents" in
	// the underlying MVCC model.
	PENDING TransactionStatus = 0
	// COMMITTED is the state for a transaction which has been
	// committed. Mutations made as part of a transaction which is moved
	// into COMMITTED state become durable and visible to other
	// transactions, moving from "intents" to permanent versioned
	// values.
	COMMITTED TransactionStatus = 1
	// ABORTED is the state for a transaction which has been aborted.
	// Mutations made as part of a transaction which is moved into
	// ABORTED state are deleted and are never made visible to other
	// transactions.
	ABORTED TransactionStatus = 2
)

func (TransactionStatus) Enum

func (TransactionStatus) EnumDescriptor

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

func (TransactionStatus) String

func (x TransactionStatus) String() string

func (*TransactionStatus) UnmarshalJSON

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

type TransactionStatusError

type TransactionStatusError struct {
	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg"`
}

A TransactionStatusError indicates that the transaction status is incompatible with the requested operation. This might mean the transaction has already been committed. It might also be the case that the request to modify the transaction failed due to a regression in transaction epoch or timestamp, both of which may only monotonically increase.

func NewTransactionStatusError

func NewTransactionStatusError(msg string) *TransactionStatusError

NewTransactionStatusError initializes a new TransactionStatusError from the given message.

func (*TransactionStatusError) Descriptor

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

func (*TransactionStatusError) Equal added in v1.1.0

func (this *TransactionStatusError) Equal(that interface{}) bool

func (*TransactionStatusError) Error

func (e *TransactionStatusError) Error() string

func (*TransactionStatusError) Marshal

func (m *TransactionStatusError) Marshal() (dAtA []byte, err error)

func (*TransactionStatusError) MarshalTo

func (m *TransactionStatusError) MarshalTo(dAtA []byte) (int, error)

func (*TransactionStatusError) ProtoMessage

func (*TransactionStatusError) ProtoMessage()

func (*TransactionStatusError) Reset

func (m *TransactionStatusError) Reset()

func (*TransactionStatusError) Size

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

func (*TransactionStatusError) String

func (m *TransactionStatusError) String() string

func (*TransactionStatusError) Unmarshal

func (m *TransactionStatusError) Unmarshal(dAtA []byte) error

type TransferLeaseRequest

type TransferLeaseRequest struct {
	Span  `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	Lease Lease `protobuf:"bytes,2,opt,name=lease" json:"lease"`
	// The previous lease is specified by the caller to verify
	// it has not changed when executing this command.
	PrevLease Lease `protobuf:"bytes,3,opt,name=prev_lease,json=prevLease" json:"prev_lease"`
}

A TransferLeaseRequest represents the arguments to the TransferLease() method. It is sent by a replica that currently holds the range lease and wants to transfer it away.

Like a RequestLeaseRequest, this request has the effect of instituting a new lease. The difference is that the new lease is allowed to overlap the existing one. It is a separate request because the RequestLeaseRequest is special - it's not subject to the same replay protection restrictions as other requests, instead being protected from replays by the fact that leases are not generally allowed to overlap. The TransferLeaseRequest is not special in this respect (for example, the proposer of this command is checked to have been holding the lease when the proposal was made).

func (*TransferLeaseRequest) Descriptor

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

func (*TransferLeaseRequest) Equal added in v1.1.0

func (this *TransferLeaseRequest) Equal(that interface{}) bool

func (*TransferLeaseRequest) Marshal

func (m *TransferLeaseRequest) Marshal() (dAtA []byte, err error)

func (*TransferLeaseRequest) MarshalTo

func (m *TransferLeaseRequest) MarshalTo(dAtA []byte) (int, error)

func (*TransferLeaseRequest) Method

func (*TransferLeaseRequest) Method() Method

Method implements the Request interface.

func (*TransferLeaseRequest) ProtoMessage

func (*TransferLeaseRequest) ProtoMessage()

func (*TransferLeaseRequest) Reset

func (m *TransferLeaseRequest) Reset()

func (*TransferLeaseRequest) ShallowCopy

func (tlr *TransferLeaseRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*TransferLeaseRequest) Size

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

func (*TransferLeaseRequest) String

func (m *TransferLeaseRequest) String() string

func (*TransferLeaseRequest) Unmarshal

func (m *TransferLeaseRequest) Unmarshal(dAtA []byte) error

type TruncateLogRequest

type TruncateLogRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// Log entries < this index are to be discarded.
	Index uint64 `protobuf:"varint,2,opt,name=index" json:"index"`
	// RangeID is used to double check that the correct range is being truncated.
	// The header specifies a span, start and end keys, but not the range id
	// itself. The range may have changed from the one specified in the header
	// in the case of a merge.
	RangeID RangeID `protobuf:"varint,3,opt,name=range_id,json=rangeId,casttype=RangeID" json:"range_id"`
}

TruncateLogRequest is used to remove a prefix of the raft log. While there is no requirement for correctness that the raft log truncation be synchronized across replicas, it is nice to preserve the property that all replicas of a range are as close to identical as possible. The raft leader can also inform decisions about the cutoff point with its knowledge of the replicas' acknowledgment status.

func (*TruncateLogRequest) Descriptor

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

func (*TruncateLogRequest) Equal added in v1.1.0

func (this *TruncateLogRequest) Equal(that interface{}) bool

func (*TruncateLogRequest) Marshal

func (m *TruncateLogRequest) Marshal() (dAtA []byte, err error)

func (*TruncateLogRequest) MarshalTo

func (m *TruncateLogRequest) MarshalTo(dAtA []byte) (int, error)

func (*TruncateLogRequest) Method

func (*TruncateLogRequest) Method() Method

Method implements the Request interface.

func (*TruncateLogRequest) ProtoMessage

func (*TruncateLogRequest) ProtoMessage()

func (*TruncateLogRequest) Reset

func (m *TruncateLogRequest) Reset()

func (*TruncateLogRequest) ShallowCopy

func (tlr *TruncateLogRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*TruncateLogRequest) Size

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

func (*TruncateLogRequest) String

func (m *TruncateLogRequest) String() string

func (*TruncateLogRequest) Unmarshal

func (m *TruncateLogRequest) Unmarshal(dAtA []byte) error

type TruncateLogResponse

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

TruncateLogResponse is the response to a TruncateLog() operation.

func (*TruncateLogResponse) Descriptor

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

func (*TruncateLogResponse) Marshal

func (m *TruncateLogResponse) Marshal() (dAtA []byte, err error)

func (*TruncateLogResponse) MarshalTo

func (m *TruncateLogResponse) MarshalTo(dAtA []byte) (int, error)

func (*TruncateLogResponse) ProtoMessage

func (*TruncateLogResponse) ProtoMessage()

func (*TruncateLogResponse) Reset

func (m *TruncateLogResponse) Reset()

func (*TruncateLogResponse) Size

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

func (*TruncateLogResponse) String

func (m *TruncateLogResponse) String() string

func (*TruncateLogResponse) Unmarshal

func (m *TruncateLogResponse) Unmarshal(dAtA []byte) error

type TxnPrevAttemptError added in v1.1.0

type TxnPrevAttemptError struct {
}

A TxnPrevAttemptError indicates a batch response for a request sent through client Txn was found that was meant for a previous incarnation of the transaction. This can happen in cases where concurrent requests are made for a Transaction and one of the requests results in a Txn abort.

func (*TxnPrevAttemptError) Descriptor added in v1.1.0

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

func (*TxnPrevAttemptError) Equal added in v1.1.0

func (this *TxnPrevAttemptError) Equal(that interface{}) bool

func (*TxnPrevAttemptError) Error added in v1.1.0

func (e *TxnPrevAttemptError) Error() string

func (*TxnPrevAttemptError) Marshal added in v1.1.0

func (m *TxnPrevAttemptError) Marshal() (dAtA []byte, err error)

func (*TxnPrevAttemptError) MarshalTo added in v1.1.0

func (m *TxnPrevAttemptError) MarshalTo(dAtA []byte) (int, error)

func (*TxnPrevAttemptError) ProtoMessage added in v1.1.0

func (*TxnPrevAttemptError) ProtoMessage()

func (*TxnPrevAttemptError) Reset added in v1.1.0

func (m *TxnPrevAttemptError) Reset()

func (*TxnPrevAttemptError) Size added in v1.1.0

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

func (*TxnPrevAttemptError) String added in v1.1.0

func (m *TxnPrevAttemptError) String() string

func (*TxnPrevAttemptError) Unmarshal added in v1.1.0

func (m *TxnPrevAttemptError) Unmarshal(dAtA []byte) error

type UnhandledRetryableError

type UnhandledRetryableError struct {
	// The underlying storage error that is being marshalled.
	// pErr.TransactionRestart is exected to be set, and the error detail is one
	// of the retryable ones.
	PErr Error `protobuf:"bytes,1,opt,name=pErr" json:"pErr"`
}

UnhandledRetryableError tells the recipient that a KV request must be retried. In case the request was transactional, the whole transaction needs to be retried. This is returned generally as a result of a transaction conflict.

This error is generated by pErr.GoError() in case of a retryable error (other than HandledRetryableTxnError). For transactional requests, the TxnCoordSender handles retryable pErrs and transform them into HandledRetryableTxnError. So, for transactional requests, only DistSQL is supposed to see this error (as it doesn't go through TxnCoordSender). For non-transactional requests, this error will be observed by layers above the TxnCoordSender.

func (*UnhandledRetryableError) Descriptor

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

func (*UnhandledRetryableError) Error

func (e *UnhandledRetryableError) Error() string

func (*UnhandledRetryableError) Marshal

func (m *UnhandledRetryableError) Marshal() (dAtA []byte, err error)

func (*UnhandledRetryableError) MarshalTo

func (m *UnhandledRetryableError) MarshalTo(dAtA []byte) (int, error)

func (*UnhandledRetryableError) ProtoMessage

func (*UnhandledRetryableError) ProtoMessage()

func (*UnhandledRetryableError) Reset

func (m *UnhandledRetryableError) Reset()

func (*UnhandledRetryableError) Size

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

func (*UnhandledRetryableError) String

func (m *UnhandledRetryableError) String() string

func (*UnhandledRetryableError) Unmarshal

func (m *UnhandledRetryableError) Unmarshal(dAtA []byte) error

type UntrackedTxnError added in v1.1.0

type UntrackedTxnError struct {
}

An UntrackedTxnError indicates that an attempt to transmit a batch request for a Transaction failed because the Transaction was not being tracked by the TxnCoordSender properly.

func (*UntrackedTxnError) Descriptor added in v1.1.0

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

func (*UntrackedTxnError) Equal added in v1.1.0

func (this *UntrackedTxnError) Equal(that interface{}) bool

func (*UntrackedTxnError) Error added in v1.1.0

func (e *UntrackedTxnError) Error() string

func (*UntrackedTxnError) Marshal added in v1.1.0

func (m *UntrackedTxnError) Marshal() (dAtA []byte, err error)

func (*UntrackedTxnError) MarshalTo added in v1.1.0

func (m *UntrackedTxnError) MarshalTo(dAtA []byte) (int, error)

func (*UntrackedTxnError) ProtoMessage added in v1.1.0

func (*UntrackedTxnError) ProtoMessage()

func (*UntrackedTxnError) Reset added in v1.1.0

func (m *UntrackedTxnError) Reset()

func (*UntrackedTxnError) Size added in v1.1.0

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

func (*UntrackedTxnError) String added in v1.1.0

func (m *UntrackedTxnError) String() string

func (*UntrackedTxnError) Unmarshal added in v1.1.0

func (m *UntrackedTxnError) Unmarshal(dAtA []byte) error

type UserPriority

type UserPriority float64

UserPriority is a custom type for transaction's user priority.

func (UserPriority) String

func (up UserPriority) String() string

type Value

type Value struct {
	// raw_bytes contains the encoded value and checksum.
	RawBytes []byte `protobuf:"bytes,1,opt,name=raw_bytes,json=rawBytes" json:"raw_bytes,omitempty"`
	// Timestamp of value.
	Timestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp"`
}

Value specifies the value at a key. Multiple values at the same key are supported based on timestamp. The data stored within a value is typed (ValueType) and custom encoded into the raw_bytes field. A custom encoding is used instead of separate proto fields to avoid proto overhead and to avoid unnecessary encoding and decoding as the value gets read from disk and passed through the network. The format is:

<4-byte-checksum><1-byte-tag><encoded-data>

A CRC-32-IEEE checksum is computed from the associated key, tag and encoded data, in that order.

TODO(peter): Is a 4-byte checksum overkill when most (all?) values will be less than 64KB?

func MakeValueFromBytes

func MakeValueFromBytes(bs []byte) Value

MakeValueFromBytes returns a value with bytes and tag set.

func MakeValueFromBytesAndTimestamp

func MakeValueFromBytesAndTimestamp(bs []byte, t hlc.Timestamp) Value

MakeValueFromBytesAndTimestamp returns a value with bytes, timestamp and tag set.

func MakeValueFromString

func MakeValueFromString(s string) Value

MakeValueFromString returns a value with bytes and tag set.

func (*Value) ClearChecksum

func (v *Value) ClearChecksum()

ClearChecksum clears the checksum value.

func (*Value) Descriptor

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

func (*Value) Equal added in v1.1.0

func (this *Value) Equal(that interface{}) bool

func (Value) GetBool

func (v Value) GetBool() (bool, error)

GetBool decodes a bool value from the bytes field of the receiver. If the tag is not INT (the tag used for bool values) or the value cannot be decoded an error will be returned.

func (Value) GetBytes

func (v Value) GetBytes() ([]byte, error)

GetBytes returns the bytes field of the receiver. If the tag is not BYTES an error will be returned.

func (Value) GetDecimal

func (v Value) GetDecimal() (apd.Decimal, error)

GetDecimal decodes a decimal value from the bytes of the receiver. If the tag is not DECIMAL an error will be returned.

func (Value) GetDuration

func (v Value) GetDuration() (duration.Duration, error)

GetDuration decodes a duration value from the bytes field of the receiver. If the tag is not DURATION an error will be returned.

func (Value) GetFloat

func (v Value) GetFloat() (float64, error)

GetFloat decodes a float64 value from the bytes field of the receiver. If the bytes field is not 8 bytes in length or the tag is not FLOAT an error will be returned.

func (Value) GetInt

func (v Value) GetInt() (int64, error)

GetInt decodes an int64 value from the bytes field of the receiver. If the tag is not INT or the value cannot be decoded an error will be returned.

func (Value) GetProto

func (v Value) GetProto(msg proto.Message) error

GetProto unmarshals the bytes field of the receiver into msg. If unmarshalling fails or the tag is not BYTES, an error will be returned.

func (Value) GetTag

func (v Value) GetTag() ValueType

GetTag retrieves the value type.

func (Value) GetTime

func (v Value) GetTime() (time.Time, error)

GetTime decodes a time value from the bytes field of the receiver. If the tag is not TIME an error will be returned.

func (Value) GetTimeseries

func (v Value) GetTimeseries() (InternalTimeSeriesData, error)

GetTimeseries decodes an InternalTimeSeriesData value from the bytes field of the receiver. An error will be returned if the tag is not TIMESERIES or if decoding fails.

func (Value) GetTuple

func (v Value) GetTuple() ([]byte, error)

GetTuple returns the tuple bytes of the receiver. If the tag is not TUPLE an error will be returned.

func (*Value) InitChecksum

func (v *Value) InitChecksum(key []byte)

InitChecksum initializes a checksum based on the provided key and the contents of the value. If the value contains a byte slice, the checksum includes it directly.

TODO(peter): This method should return an error if the Value is corrupted (e.g. the RawBytes field is > 0 but smaller than the header size).

func (*Value) IsPresent added in v1.1.0

func (v *Value) IsPresent() bool

IsPresent returns true if the value is present (existent and not a tombstone).

func (*Value) Marshal

func (m *Value) Marshal() (dAtA []byte, err error)

func (*Value) MarshalTo

func (m *Value) MarshalTo(dAtA []byte) (int, error)

func (Value) PrettyPrint

func (v Value) PrettyPrint() string

PrettyPrint returns the value in a human readable format. e.g. `Put /Table/51/1/1/0 -> /TUPLE/2:2:Int/7/1:3:Float/6.28` In `1:3:Float/6.28`, the `1` is the column id diff as stored, `3` is the computed (i.e. not stored) actual column id, `Float` is the type, and `6.28` is the encoded value.

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) SetBool

func (v *Value) SetBool(b bool)

SetBool encodes the specified bool value into the bytes field of the receiver, sets the tag and clears the checksum.

func (*Value) SetBytes

func (v *Value) SetBytes(b []byte)

SetBytes sets the bytes and tag field of the receiver and clears the checksum.

func (*Value) SetDecimal

func (v *Value) SetDecimal(dec *apd.Decimal) error

SetDecimal encodes the specified decimal value into the bytes field of the receiver using Gob encoding, sets the tag and clears the checksum.

func (*Value) SetDuration

func (v *Value) SetDuration(t duration.Duration) error

SetDuration encodes the specified duration value into the bytes field of the receiver, sets the tag and clears the checksum.

func (*Value) SetFloat

func (v *Value) SetFloat(f float64)

SetFloat encodes the specified float64 value into the bytes field of the receiver, sets the tag and clears the checksum.

func (*Value) SetInt

func (v *Value) SetInt(i int64)

SetInt encodes the specified int64 value into the bytes field of the receiver, sets the tag and clears the checksum.

func (*Value) SetProto

func (v *Value) SetProto(msg proto.Message) error

SetProto encodes the specified proto message into the bytes field of the receiver and clears the checksum. If the proto message is an InternalTimeSeriesData, the tag will be set to TIMESERIES rather than BYTES.

func (*Value) SetString

func (v *Value) SetString(s string)

SetString sets the bytes and tag field of the receiver and clears the checksum. This is identical to SetBytes, but specialized for a string argument.

func (*Value) SetTime

func (v *Value) SetTime(t time.Time)

SetTime encodes the specified time value into the bytes field of the receiver, sets the tag and clears the checksum.

func (*Value) SetTuple

func (v *Value) SetTuple(data []byte)

SetTuple sets the tuple bytes and tag field of the receiver and clears the checksum.

func (*Value) ShallowClone

func (v *Value) ShallowClone() *Value

ShallowClone returns a shallow clone of the receiver.

func (*Value) Size

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

func (*Value) String

func (m *Value) String() string

func (*Value) Unmarshal

func (m *Value) Unmarshal(dAtA []byte) error

func (Value) Verify

func (v Value) Verify(key []byte) error

Verify verifies the value's Checksum matches a newly-computed checksum of the value's contents. If the value's Checksum is not set the verification is a noop.

type ValueType

type ValueType int32

ValueType defines a set of type constants placed in the "tag" field of Value messages. These are defined as a protocol buffer enumeration so that they can be used portably between our Go and C code. The tags are used by the RocksDB Merge Operator to perform specialized merges.

const (
	// This is a subset of the SQL column type values, representing the underlying
	// storage for various types. The DELIMITED_foo entries each represent a foo
	// variant that self-delimits length.
	ValueType_UNKNOWN           ValueType = 0
	ValueType_NULL              ValueType = 7
	ValueType_INT               ValueType = 1
	ValueType_FLOAT             ValueType = 2
	ValueType_BYTES             ValueType = 3
	ValueType_DELIMITED_BYTES   ValueType = 8
	ValueType_TIME              ValueType = 4
	ValueType_DECIMAL           ValueType = 5
	ValueType_DELIMITED_DECIMAL ValueType = 9
	ValueType_DURATION          ValueType = 6
	// TUPLE represents a DTuple, encoded as repeated pairs of varint field number
	// followed by a value encoded Datum.
	ValueType_TUPLE ValueType = 10
	// TIMESERIES is applied to values which contain InternalTimeSeriesData.
	ValueType_TIMESERIES ValueType = 100
)

func (ValueType) Enum

func (x ValueType) Enum() *ValueType

func (ValueType) EnumDescriptor

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

func (ValueType) String

func (x ValueType) String() string

func (*ValueType) UnmarshalJSON

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

type Version added in v1.1.0

type Version struct {
	// The names "major" and "minor" are reserved in C in
	// some platforms (e.g. FreeBSD).
	Major int32 `protobuf:"varint,1,opt,name=major_val,json=majorVal" json:"major_val"`
	Minor int32 `protobuf:"varint,2,opt,name=minor_val,json=minorVal" json:"minor_val"`
	// Note that patch is a placeholder and will always be zero.
	Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch"`
	// The unstable version is used to migrate during development.
	// Users of stable, public releases will only use binaries
	// with unstable set to 0.
	Unstable int32 `protobuf:"varint,4,opt,name=unstable" json:"unstable"`
}

func MustParseVersion added in v1.1.0

func MustParseVersion(s string) Version

MustParseVersion calls ParseVersion and panics on error.

func ParseVersion added in v1.1.0

func ParseVersion(s string) (Version, error)

ParseVersion parses a Version from a string of the form "<major>.<minor>-<unstable>" where the "-<unstable>" is optional. We don't use the Patch component, so it is always zero.

func (Version) CanBump added in v1.1.0

func (v Version) CanBump(o Version) bool

CanBump computes whether an update from version v to version o is possible. The main constraint is that either nothing changes; or the major version is bumped by one (and the new minor is zero); or the major version remains constant and the minor version is bumped by one. The unstable version may change without restrictions.

func (*Version) Descriptor added in v1.1.0

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

func (Version) Less added in v1.1.0

func (v Version) Less(otherV Version) bool

Less compares two Versions.

func (*Version) Marshal added in v1.1.0

func (m *Version) Marshal() (dAtA []byte, err error)

func (*Version) MarshalTo added in v1.1.0

func (m *Version) MarshalTo(dAtA []byte) (int, error)

func (*Version) ProtoMessage added in v1.1.0

func (*Version) ProtoMessage()

func (*Version) Reset added in v1.1.0

func (m *Version) Reset()

func (*Version) Size added in v1.1.0

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

func (Version) String added in v1.1.0

func (v Version) String() string

func (*Version) Unmarshal added in v1.1.0

func (m *Version) Unmarshal(dAtA []byte) error

type WriteBatchRequest

type WriteBatchRequest struct {
	Span `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"`
	// The span of keys encoded in data, duplicated because the header span can
	// be modified by DistSender and we use this one to fail fast.
	DataSpan Span `protobuf:"bytes,2,opt,name=data_span,json=dataSpan" json:"data_span"`
	// A BatchRepr, the serialized form of a RocksDB Batch.
	Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
}

WriteBatchRequest is arguments to the WriteBatch() method, to apply the operations encoded in a BatchRepr.

func (*WriteBatchRequest) Descriptor

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

func (*WriteBatchRequest) Equal added in v1.1.0

func (this *WriteBatchRequest) Equal(that interface{}) bool

func (*WriteBatchRequest) Marshal

func (m *WriteBatchRequest) Marshal() (dAtA []byte, err error)

func (*WriteBatchRequest) MarshalTo

func (m *WriteBatchRequest) MarshalTo(dAtA []byte) (int, error)

func (*WriteBatchRequest) Method

func (*WriteBatchRequest) Method() Method

Method implements the Request interface.

func (*WriteBatchRequest) ProtoMessage

func (*WriteBatchRequest) ProtoMessage()

func (*WriteBatchRequest) Reset

func (m *WriteBatchRequest) Reset()

func (*WriteBatchRequest) ShallowCopy

func (r *WriteBatchRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*WriteBatchRequest) Size

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

func (*WriteBatchRequest) String

func (m *WriteBatchRequest) String() string

func (*WriteBatchRequest) Unmarshal

func (m *WriteBatchRequest) Unmarshal(dAtA []byte) error

type WriteBatchResponse

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

WriteBatchResponse is the response to a WriteBatch() operation.

func (*WriteBatchResponse) Descriptor

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

func (*WriteBatchResponse) Marshal

func (m *WriteBatchResponse) Marshal() (dAtA []byte, err error)

func (*WriteBatchResponse) MarshalTo

func (m *WriteBatchResponse) MarshalTo(dAtA []byte) (int, error)

func (*WriteBatchResponse) ProtoMessage

func (*WriteBatchResponse) ProtoMessage()

func (*WriteBatchResponse) Reset

func (m *WriteBatchResponse) Reset()

func (*WriteBatchResponse) Size

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

func (*WriteBatchResponse) String

func (m *WriteBatchResponse) String() string

func (*WriteBatchResponse) Unmarshal

func (m *WriteBatchResponse) Unmarshal(dAtA []byte) error

type WriteIntentError

type WriteIntentError struct {
	Intents []Intent `protobuf:"bytes,1,rep,name=intents" json:"intents"`
}

A WriteIntentError indicates that one or more write intent belonging to another transaction were encountered leading to a read/write or write/write conflict. The keys at which the intent was encountered are set, as are the txn records for the intents' transactions.

func (*WriteIntentError) Descriptor

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

func (*WriteIntentError) Equal added in v1.1.0

func (this *WriteIntentError) Equal(that interface{}) bool

func (*WriteIntentError) Error

func (e *WriteIntentError) Error() string

func (*WriteIntentError) Marshal

func (m *WriteIntentError) Marshal() (dAtA []byte, err error)

func (*WriteIntentError) MarshalTo

func (m *WriteIntentError) MarshalTo(dAtA []byte) (int, error)

func (*WriteIntentError) ProtoMessage

func (*WriteIntentError) ProtoMessage()

func (*WriteIntentError) Reset

func (m *WriteIntentError) Reset()

func (*WriteIntentError) Size

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

func (*WriteIntentError) String

func (m *WriteIntentError) String() string

func (*WriteIntentError) Unmarshal

func (m *WriteIntentError) Unmarshal(dAtA []byte) error

type WriteTooOldError

type WriteTooOldError struct {
	Timestamp       cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp"`
	ActualTimestamp cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=actual_timestamp,json=actualTimestamp" json:"actual_timestamp"`
}

A WriteTooOldError indicates that a write encountered a versioned value newer than its timestamp, making it impossible to rewrite history. The write is instead done at actual timestamp, which is the timestamp of the existing version+1.

func (*WriteTooOldError) Descriptor

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

func (*WriteTooOldError) Equal added in v1.1.0

func (this *WriteTooOldError) Equal(that interface{}) bool

func (*WriteTooOldError) Error

func (e *WriteTooOldError) Error() string

func (*WriteTooOldError) Marshal

func (m *WriteTooOldError) Marshal() (dAtA []byte, err error)

func (*WriteTooOldError) MarshalTo

func (m *WriteTooOldError) MarshalTo(dAtA []byte) (int, error)

func (*WriteTooOldError) ProtoMessage

func (*WriteTooOldError) ProtoMessage()

func (*WriteTooOldError) Reset

func (m *WriteTooOldError) Reset()

func (*WriteTooOldError) Size

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

func (*WriteTooOldError) String

func (m *WriteTooOldError) String() string

func (*WriteTooOldError) Unmarshal

func (m *WriteTooOldError) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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