Documentation
¶
Index ¶
- Variables
- type AccessMove
- func (*AccessMove) Descriptor() ([]byte, []int)deprecated
- func (x *AccessMove) GetEntity() string
- func (x *AccessMove) GetFrom() *AnchorRef
- func (x *AccessMove) GetFromWithin() *WithinState
- func (x *AccessMove) GetKey() string
- func (x *AccessMove) GetMoreFrom() []*AnchorRef
- func (x *AccessMove) GetMoreTo() []*AnchorRef
- func (x *AccessMove) GetTo() *AnchorRef
- func (*AccessMove) ProtoMessage()
- func (x *AccessMove) ProtoReflect() protoreflect.Message
- func (x *AccessMove) Reset()
- func (x *AccessMove) String() string
- type AnchorRef
- type BootstrapPosition
- func (*BootstrapPosition) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapPosition) GetAfterKey() string
- func (x *BootstrapPosition) GetDone() []string
- func (x *BootstrapPosition) GetEntity() string
- func (*BootstrapPosition) ProtoMessage()
- func (x *BootstrapPosition) ProtoReflect() protoreflect.Message
- func (x *BootstrapPosition) Reset()
- func (x *BootstrapPosition) String() string
- type CheckedRule
- func (*CheckedRule) Descriptor() ([]byte, []int)deprecated
- func (x *CheckedRule) GetCallerIs() string
- func (x *CheckedRule) GetOps() []string
- func (x *CheckedRule) GetRequires() []string
- func (x *CheckedRule) GetWhen() *v1.Condition
- func (x *CheckedRule) GetWithin() []*WithinRule
- func (*CheckedRule) ProtoMessage()
- func (x *CheckedRule) ProtoReflect() protoreflect.Message
- func (x *CheckedRule) Reset()
- func (x *CheckedRule) String() string
- type ClosureSet
- type ClosureSet_Entry
- func (*ClosureSet_Entry) Descriptor() ([]byte, []int)deprecated
- func (x *ClosureSet_Entry) GetEntity() string
- func (x *ClosureSet_Entry) GetKeys() []string
- func (*ClosureSet_Entry) ProtoMessage()
- func (x *ClosureSet_Entry) ProtoReflect() protoreflect.Message
- func (x *ClosureSet_Entry) Reset()
- func (x *ClosureSet_Entry) String() string
- type Cursor
- func (*Cursor) Descriptor() ([]byte, []int)deprecated
- func (x *Cursor) GetAccessHash() uint64
- func (x *Cursor) GetAccessMovesThrough() uint64
- func (x *Cursor) GetAccessPolicy() uint64
- func (x *Cursor) GetAccessRef() *StateRef
- func (x *Cursor) GetAccessTag() uint64
- func (x *Cursor) GetCallerAccessHash() uint64
- func (x *Cursor) GetCallerAccessRef() *StateRef
- func (x *Cursor) GetClosure() *ClosureSet
- func (x *Cursor) GetClosureRebuild() bool
- func (x *Cursor) GetEpochTag() uint64
- func (x *Cursor) GetFilterEpoch() uint64
- func (x *Cursor) GetPartialEntity() string
- func (x *Cursor) GetPartialKey() string
- func (x *Cursor) GetResync() *ResyncState
- func (x *Cursor) GetResynced() bool
- func (x *Cursor) GetSeq() uint64
- func (x *Cursor) GetSeqLineage() uint64
- func (x *Cursor) GetSetsRef() *StateRef
- func (x *Cursor) GetStoreEpoch() uint64
- func (x *Cursor) GetSubHash() uint64
- func (x *Cursor) GetSubscriptions() []*v1.Subscription
- func (x *Cursor) GetWindow() *ClosureSet
- func (x *Cursor) GetWindows() []*WindowState
- func (*Cursor) ProtoMessage()
- func (x *Cursor) ProtoReflect() protoreflect.Message
- func (x *Cursor) Reset()
- func (x *Cursor) String() string
- type EntityReadRule
- func (*EntityReadRule) Descriptor() ([]byte, []int)deprecated
- func (x *EntityReadRule) GetEntity() string
- func (x *EntityReadRule) GetHides() []*HidingGuard
- func (x *EntityReadRule) GetOpen() bool
- func (x *EntityReadRule) GetParents() []*ParentCase
- func (x *EntityReadRule) GetRead() *ReadersRule
- func (*EntityReadRule) ProtoMessage()
- func (x *EntityReadRule) ProtoReflect() protoreflect.Message
- func (x *EntityReadRule) Reset()
- func (x *EntityReadRule) String() string
- type HidingGuard
- func (*HidingGuard) Descriptor() ([]byte, []int)deprecated
- func (x *HidingGuard) GetRead() *ReadersRule
- func (x *HidingGuard) GetUnits() []string
- func (*HidingGuard) ProtoMessage()
- func (x *HidingGuard) ProtoReflect() protoreflect.Message
- func (x *HidingGuard) Reset()
- func (x *HidingGuard) String() string
- type ParentCase
- type PermissionAnchors
- func (*PermissionAnchors) Descriptor() ([]byte, []int)deprecated
- func (x *PermissionAnchors) GetPermission() string
- func (x *PermissionAnchors) GetRoot() bool
- func (x *PermissionAnchors) GetRows() []*ClosureSet_Entry
- func (*PermissionAnchors) ProtoMessage()
- func (x *PermissionAnchors) ProtoReflect() protoreflect.Message
- func (x *PermissionAnchors) Reset()
- func (x *PermissionAnchors) String() string
- type ReadAccess
- func (*ReadAccess) Descriptor() ([]byte, []int)deprecated
- func (x *ReadAccess) GetMaxAccessDepth() uint32
- func (x *ReadAccess) GetPermissions() []*PermissionAnchors
- func (x *ReadAccess) GetRules() []*EntityReadRule
- func (x *ReadAccess) GetSeqKey() []byte
- func (x *ReadAccess) GetSubjects() []string
- func (*ReadAccess) ProtoMessage()
- func (x *ReadAccess) ProtoReflect() protoreflect.Message
- func (x *ReadAccess) Reset()
- func (x *ReadAccess) String() string
- type ReadersRule
- func (*ReadersRule) Descriptor() ([]byte, []int)deprecated
- func (x *ReadersRule) GetAll() bool
- func (x *ReadersRule) GetChecked() []*CheckedRule
- func (x *ReadersRule) GetPermissions() []string
- func (*ReadersRule) ProtoMessage()
- func (x *ReadersRule) ProtoReflect() protoreflect.Message
- func (x *ReadersRule) Reset()
- func (x *ReadersRule) String() string
- type ResyncState
- func (*ResyncState) Descriptor() ([]byte, []int)deprecated
- func (x *ResyncState) GetAfterKey() string
- func (x *ResyncState) GetEntity() string
- func (x *ResyncState) GetToAccessHash() uint64
- func (x *ResyncState) GetToFilterEpoch() uint64
- func (x *ResyncState) GetToMovesThrough() uint64
- func (x *ResyncState) GetToSubHash() uint64
- func (*ResyncState) ProtoMessage()
- func (x *ResyncState) ProtoReflect() protoreflect.Message
- func (x *ResyncState) Reset()
- func (x *ResyncState) String() string
- type StateRef
- type StoredSets
- func (*StoredSets) Descriptor() ([]byte, []int)deprecated
- func (x *StoredSets) GetClosure() *ClosureSet
- func (x *StoredSets) GetSeqKey() []byte
- func (x *StoredSets) GetSubscriptions() []*v1.Subscription
- func (x *StoredSets) GetWindow() *ClosureSet
- func (x *StoredSets) GetWindows() []*WindowState
- func (*StoredSets) ProtoMessage()
- func (x *StoredSets) ProtoReflect() protoreflect.Message
- func (x *StoredSets) Reset()
- func (x *StoredSets) String() string
- type WindowState
- func (*WindowState) Descriptor() ([]byte, []int)deprecated
- func (x *WindowState) GetBoundary() []byte
- func (x *WindowState) GetKeys() []string
- func (x *WindowState) GetSubscription() uint32
- func (*WindowState) ProtoMessage()
- func (x *WindowState) ProtoReflect() protoreflect.Message
- func (x *WindowState) Reset()
- func (x *WindowState) String() string
- type WithinRule
- func (*WithinRule) Descriptor() ([]byte, []int)deprecated
- func (x *WithinRule) GetCallerIs() string
- func (x *WithinRule) GetEntity() string
- func (x *WithinRule) GetWhen() *v1.Condition
- func (*WithinRule) ProtoMessage()
- func (x *WithinRule) ProtoReflect() protoreflect.Message
- func (x *WithinRule) Reset()
- func (x *WithinRule) String() string
- type WithinState
- func (*WithinState) Descriptor() ([]byte, []int)deprecated
- func (x *WithinState) GetMatched() []string
- func (x *WithinState) GetSubjects() map[string]string
- func (*WithinState) ProtoMessage()
- func (x *WithinState) ProtoReflect() protoreflect.Message
- func (x *WithinState) Reset()
- func (x *WithinState) String() string
Constants ¶
This section is empty.
Variables ¶
var File_syncplane_cursor_v1_cursor_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AccessMove ¶ added in v0.2.0
type AccessMove struct {
// The row whose access parent changed.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// The first of the row's access parents before the change, as of the start
// of the sequence, in entity and then key order; absent when the row did
// not exist or anchored at nothing. more_from holds the others, in the
// same order.
From *AnchorRef `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
// The first of the row's access parents after the change; absent when the
// row was deleted or anchors at nothing. more_to holds the others.
To *AnchorRef `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"`
MoreFrom []*AnchorRef `protobuf:"bytes,5,rep,name=more_from,json=moreFrom,proto3" json:"more_from,omitempty"`
MoreTo []*AnchorRef `protobuf:"bytes,6,rep,name=more_to,json=moreTo,proto3" json:"more_to,omitempty"`
// What the access rules' within checks read of the row before the change,
// as of the start of the sequence. Set only for a row of an entity that a
// within check names, and only when the row existed: absent, the row
// passed no such check.
FromWithin *WithinState `protobuf:"bytes,7,opt,name=from_within,json=fromWithin,proto3" json:"from_within,omitempty"`
// contains filtered or unexported fields
}
AccessMove is one change of the access parent of a row that other rows sit below: a move to another parent, a change of what access rules' within checks read of the row, or the row's creation or deletion. The rows below it change visibility without being written, so the server records the change in the transaction that makes it, as a row of an entity no schema declares, at the change's sequence. A pull reads the moves after its cursor and resyncs the rows below each one that changes what the client can read.
func (*AccessMove) Descriptor
deprecated
added in
v0.2.0
func (*AccessMove) Descriptor() ([]byte, []int)
Deprecated: Use AccessMove.ProtoReflect.Descriptor instead.
func (*AccessMove) GetEntity ¶ added in v0.2.0
func (x *AccessMove) GetEntity() string
func (*AccessMove) GetFrom ¶ added in v0.2.0
func (x *AccessMove) GetFrom() *AnchorRef
func (*AccessMove) GetFromWithin ¶ added in v0.2.0
func (x *AccessMove) GetFromWithin() *WithinState
func (*AccessMove) GetKey ¶ added in v0.2.0
func (x *AccessMove) GetKey() string
func (*AccessMove) GetMoreFrom ¶ added in v0.2.0
func (x *AccessMove) GetMoreFrom() []*AnchorRef
func (*AccessMove) GetMoreTo ¶ added in v0.2.0
func (x *AccessMove) GetMoreTo() []*AnchorRef
func (*AccessMove) GetTo ¶ added in v0.2.0
func (x *AccessMove) GetTo() *AnchorRef
func (*AccessMove) ProtoMessage ¶ added in v0.2.0
func (*AccessMove) ProtoMessage()
func (*AccessMove) ProtoReflect ¶ added in v0.2.0
func (x *AccessMove) ProtoReflect() protoreflect.Message
func (*AccessMove) Reset ¶ added in v0.2.0
func (x *AccessMove) Reset()
func (*AccessMove) String ¶ added in v0.2.0
func (x *AccessMove) String() string
type AnchorRef ¶ added in v0.2.0
type AnchorRef struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
AnchorRef names one row of a workspace.
func (*AnchorRef) Descriptor
deprecated
added in
v0.2.0
func (*AnchorRef) ProtoMessage ¶ added in v0.2.0
func (*AnchorRef) ProtoMessage()
func (*AnchorRef) ProtoReflect ¶ added in v0.2.0
func (x *AnchorRef) ProtoReflect() protoreflect.Message
type BootstrapPosition ¶
type BootstrapPosition struct {
// Entities whose scan ran to completion, in no particular order. Every row
// of these that the snapshot ships has been delivered.
Done []string `protobuf:"bytes,1,rep,name=done,proto3" json:"done,omitempty"`
// The entity that was mid-scan, and the last row key delivered within it.
// The resumed scan restarts this entity after that key. Empty when the
// interruption fell on an entity boundary.
Entity string `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
AfterKey string `protobuf:"bytes,3,opt,name=after_key,json=afterKey,proto3" json:"after_key,omitempty"`
// contains filtered or unexported fields
}
BootstrapPosition is how far an interrupted Bootstrap got: what rides inside the opaque BootstrapResume.token. It records the delivered set by NAME rather than as a position in the delivery order, because that order is not stable across attempts — a client may ask for different priority entities, and the catalog may gain an entity between attempts. A resumed scan then skips exactly what already shipped and covers everything else in full, whatever order the resumed stream delivers it in.
func (*BootstrapPosition) Descriptor
deprecated
func (*BootstrapPosition) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapPosition.ProtoReflect.Descriptor instead.
func (*BootstrapPosition) GetAfterKey ¶
func (x *BootstrapPosition) GetAfterKey() string
func (*BootstrapPosition) GetDone ¶
func (x *BootstrapPosition) GetDone() []string
func (*BootstrapPosition) GetEntity ¶
func (x *BootstrapPosition) GetEntity() string
func (*BootstrapPosition) ProtoMessage ¶
func (*BootstrapPosition) ProtoMessage()
func (*BootstrapPosition) ProtoReflect ¶
func (x *BootstrapPosition) ProtoReflect() protoreflect.Message
func (*BootstrapPosition) Reset ¶
func (x *BootstrapPosition) Reset()
func (*BootstrapPosition) String ¶
func (x *BootstrapPosition) String() string
type CheckedRule ¶ added in v0.2.0
type CheckedRule struct {
// The operations the rule admits, by name, in the engine's order.
Ops []string `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"`
// The permissions the rule needs, sorted; empty for a rule that admits
// every admitted caller.
Requires []string `protobuf:"bytes,2,rep,name=requires,proto3" json:"requires,omitempty"`
// The field that must hold one of the caller's subjects.
CallerIs string `protobuf:"bytes,3,opt,name=caller_is,json=callerIs,proto3" json:"caller_is,omitempty"`
// The condition a row must match.
When *v1.Condition `protobuf:"bytes,4,opt,name=when,proto3" json:"when,omitempty"`
// The rule's within entries, in the engine's order.
Within []*WithinRule `protobuf:"bytes,5,rep,name=within,proto3" json:"within,omitempty"`
// contains filtered or unexported fields
}
CheckedRule is one access rule of a ReadersRule.checked list.
func (*CheckedRule) Descriptor
deprecated
added in
v0.2.0
func (*CheckedRule) Descriptor() ([]byte, []int)
Deprecated: Use CheckedRule.ProtoReflect.Descriptor instead.
func (*CheckedRule) GetCallerIs ¶ added in v0.2.0
func (x *CheckedRule) GetCallerIs() string
func (*CheckedRule) GetOps ¶ added in v0.2.0
func (x *CheckedRule) GetOps() []string
func (*CheckedRule) GetRequires ¶ added in v0.2.0
func (x *CheckedRule) GetRequires() []string
func (*CheckedRule) GetWhen ¶ added in v0.2.0
func (x *CheckedRule) GetWhen() *v1.Condition
func (*CheckedRule) GetWithin ¶ added in v0.2.0
func (x *CheckedRule) GetWithin() []*WithinRule
func (*CheckedRule) ProtoMessage ¶ added in v0.2.0
func (*CheckedRule) ProtoMessage()
func (*CheckedRule) ProtoReflect ¶ added in v0.2.0
func (x *CheckedRule) ProtoReflect() protoreflect.Message
func (*CheckedRule) Reset ¶ added in v0.2.0
func (x *CheckedRule) Reset()
func (*CheckedRule) String ¶ added in v0.2.0
func (x *CheckedRule) String() string
type ClosureSet ¶
type ClosureSet struct {
Entries []*ClosureSet_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
// contains filtered or unexported fields
}
ClosureSet records a bounded membership set as a per-entity list of row keys. Two features ride on it — the reference-following closure and the windowed subscription set — because both are memberships that cannot be derived per row and so must be STORED to be diffed. Keeping the prior set (rather than reconstructing it from a spec) is what makes drops exact.
func (*ClosureSet) Descriptor
deprecated
func (*ClosureSet) Descriptor() ([]byte, []int)
Deprecated: Use ClosureSet.ProtoReflect.Descriptor instead.
func (*ClosureSet) GetEntries ¶
func (x *ClosureSet) GetEntries() []*ClosureSet_Entry
func (*ClosureSet) ProtoMessage ¶
func (*ClosureSet) ProtoMessage()
func (*ClosureSet) ProtoReflect ¶
func (x *ClosureSet) ProtoReflect() protoreflect.Message
func (*ClosureSet) Reset ¶
func (x *ClosureSet) Reset()
func (*ClosureSet) String ¶
func (x *ClosureSet) String() string
type ClosureSet_Entry ¶
type ClosureSet_Entry struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}
func (*ClosureSet_Entry) Descriptor
deprecated
func (*ClosureSet_Entry) Descriptor() ([]byte, []int)
Deprecated: Use ClosureSet_Entry.ProtoReflect.Descriptor instead.
func (*ClosureSet_Entry) GetEntity ¶
func (x *ClosureSet_Entry) GetEntity() string
func (*ClosureSet_Entry) GetKeys ¶
func (x *ClosureSet_Entry) GetKeys() []string
func (*ClosureSet_Entry) ProtoMessage ¶
func (*ClosureSet_Entry) ProtoMessage()
func (*ClosureSet_Entry) ProtoReflect ¶
func (x *ClosureSet_Entry) ProtoReflect() protoreflect.Message
func (*ClosureSet_Entry) Reset ¶
func (x *ClosureSet_Entry) Reset()
func (*ClosureSet_Entry) String ¶
func (x *ClosureSet_Entry) String() string
type Cursor ¶
type Cursor struct {
// Workspace sequence the client has seen through.
Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
// Hash of the subscription set the cursor was issued under; 0 = full sync.
// A mismatch on the next pull starts a delta resync into the new set (or
// forces reset when the old set cannot be reconstructed).
SubHash uint64 `protobuf:"fixed64,2,opt,name=sub_hash,json=subHash,proto3" json:"sub_hash,omitempty"`
// Permissions filter epoch the cursor was issued under. A mismatch starts
// a delta resync (apps implementing EpochReadFilters) or forces reset, so
// visibility changes outside row edits propagate to clients.
FilterEpoch uint64 `protobuf:"varint,3,opt,name=filter_epoch,json=filterEpoch,proto3" json:"filter_epoch,omitempty"`
// The subscription set the cursor was issued under (the set sub_hash
// hashes). Lets the server reconstruct the client's old scope and resync
// only the visible-set difference after a subscription change.
Subscriptions []*v1.Subscription `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// Present while a delta resync is paging; absent on a settled cursor.
Resync *ResyncState `protobuf:"bytes,5,opt,name=resync,proto3" json:"resync,omitempty"`
// Sub-position inside a same-version group when a pull page splits one.
// Multiple rows can share one workspace sequence (a BatchMutation, a
// multi-row custom mutator, Server.Mutate/Invoke). When a page boundary
// lands inside such a group, seq names that version and these name the
// last row already delivered within it (in (entity, key) order), so the
// next pull resumes at the remaining rows instead of skipping them.
// Empty on a clean version boundary (the common case).
PartialEntity string `protobuf:"bytes,6,opt,name=partial_entity,json=partialEntity,proto3" json:"partial_entity,omitempty"`
PartialKey string `protobuf:"bytes,7,opt,name=partial_key,json=partialKey,proto3" json:"partial_key,omitempty"`
// A random per-workspace identity, minted when the workspace is first
// written and stable for its lifetime. It pins a cursor to the store
// lineage that issued it: a cursor stamped with one epoch presented to a
// store carrying a different one cannot have come from this store (the URL
// now serves a swapped, recreated, or restored database), so pull resets
// rather than splicing two lineages' histories together. 0 = a pre-write
// cursor that carries no epoch; the server stamps the current one onto
// every cursor it issues going forward.
StoreEpoch uint64 `protobuf:"fixed64,8,opt,name=store_epoch,json=storeEpoch,proto3" json:"store_epoch,omitempty"`
// The reference-following closure the cursor was issued under: the exact
// set of (entity, key) rows the client holds via `follow` beyond its base
// scope. The next pull brings the closure up to date against current data
// and diffs it against this set, emitting rows that entered and tombstoning
// rows that left (and are not otherwise base-visible) — which is also what
// makes the set the INPUT to that update, since a member nothing touched
// carries straight over. Absent on non-following subscriptions ⇒ empty.
// Bounded by the server's MaxClosureSize, so the cursor stays bounded.
Closure *ClosureSet `protobuf:"bytes,9,opt,name=closure,proto3" json:"closure,omitempty"`
// The windowed membership the cursor was issued under, as ONE set across
// every window: the exact rows the client holds via a Subscription.window.
// The next pull diffs its recomputed membership against this, so rows that
// fell off the tail are dropped precisely rather than lingering.
//
// Written by servers that predate `windows`, and by a page that truncates
// after delivering window members the cursor it read did not name: what
// the client then holds is no single window's membership. A cursor
// carrying `windows` leaves this empty and the union is derived. Both
// forms diff identically — the split one additionally says which window
// holds what, which is what maintaining a window costs less than
// rebuilding it, so the pull after this form resolves every window again.
Window *ClosureSet `protobuf:"bytes,10,opt,name=window,proto3" json:"window,omitempty"`
// The windowed membership split per window, one entry per
// Subscription.window in `subscriptions` order. Absent on non-windowed
// subscriptions and on cursors older than this field. Bounded by the
// server's MaxWindowSize per windowed subscription.
Windows []*WindowState `protobuf:"bytes,11,rep,name=windows,proto3" json:"windows,omitempty"`
// Reference to an externally stored StoredSets entry holding what fields
// 4, 9, 10 and 11 would otherwise inline. When set, those fields are empty
// and the sets live in the server's cursor-state store; the cursor itself
// stays a few dozen bytes however large the client's membership grows.
// A referenced entry the store no longer holds resets the client, exactly
// as a cursor below the tombstone horizon does — which is why servers
// without a store, and entries too small to be worth a store round trip,
// keep inlining instead.
SetsRef *StateRef `protobuf:"bytes,12,opt,name=sets_ref,json=setsRef,proto3" json:"sets_ref,omitempty"`
// Set when `closure` was not walked from the seeds of `subscriptions` as
// they stood at `seq`: a delta resync carries the old scope's closure onto
// the cursor it completes with, because the resync reconciles base scope
// only and leaves the closure to the pull that follows; and a page that
// truncates after delivering closure members, or window members that seed
// one, carries the members it delivered beside the set it read. The set
// still names exactly the rows the client holds via `follow`, so the diff
// against it stays exact, but it cannot be maintained from what changed
// since seq. The next following pull walks the closure again from the
// current seeds, and clears this once it stores the rebuilt set at a clean
// version boundary.
ClosureRebuild bool `protobuf:"varint,13,opt,name=closure_rebuild,json=closureRebuild,proto3" json:"closure_rebuild,omitempty"`
// Set on the cursor a delta resync completes with, and kept by the pages of
// the catch-up pull that follows it until one ends at a clean version
// boundary. The resync reconciles the client's rows as of its seq only, so
// a row the new scope or access shows that was written past that seq
// reaches the client for the first time on some page of the catch-up —
// which therefore ships every row as full state, since delta state presumes
// the client holds the row as of the page's cursor.
Resynced bool `protobuf:"varint,14,opt,name=resynced,proto3" json:"resynced,omitempty"`
// Fingerprint of the read rules of the access model the cursor was issued
// under (see ReadAccess.rules), 0 for a schema without the model. A pull
// under other rules compares the stored rules entity by entity, and resets
// when an entity both sides know reads by another rule, or when no stored
// ReadAccess names the rules.
AccessPolicy uint64 `protobuf:"fixed64,15,opt,name=access_policy,json=accessPolicy,proto3" json:"access_policy,omitempty"`
// Hash of what the caller could read when the cursor was issued: its
// subjects and, per read permission, the anchors it held the permission at
// (see ReadAccess). A pull that finds a different hash resyncs the rows
// under the anchors that changed. 0 for a schema without the model.
AccessHash uint64 `protobuf:"fixed64,16,opt,name=access_hash,json=accessHash,proto3" json:"access_hash,omitempty"`
// Reference to the stored ReadAccess the hash was computed from. Never
// inlined: a resync tombstones rows by what this names, so a client must
// not be able to write it. Absent when the store could not take the entry;
// a later change of access then resets the client.
AccessRef *StateRef `protobuf:"bytes,17,opt,name=access_ref,json=accessRef,proto3" json:"access_ref,omitempty"`
// Hash of the CallerAccess the client last received: every permission the
// caller holds, not only the ones entities read by. It is the summary's
// CallerAccess.version. A client that sends no
// PullRequest.caller_access_version receives a new CallerAccess when the
// hash differs. 0 for a schema without the model.
CallerAccessHash uint64 `protobuf:"fixed64,18,opt,name=caller_access_hash,json=callerAccessHash,proto3" json:"caller_access_hash,omitempty"`
// The sequence through which the rows the client holds reflect every
// access move (see AccessMove). A pull compares the client's rows with
// the moves after the greater of seq and this, so the pull that follows a
// resync does not resync the same moves again. 0 when seq alone says it.
AccessMovesThrough uint64 `protobuf:"varint,19,opt,name=access_moves_through,json=accessMovesThrough,proto3" json:"access_moves_through,omitempty"`
// Reference to the stored syncplane.v1.CallerAccess whose version is
// caller_access_hash, with seq 0. A pull whose client holds that version
// is sent the change from it as a CallerAccessDelta. It has its own
// lineage, apart from access_ref's, so a change to only one of the two
// writes only one entry. Absent when the store could not take the entry,
// and on cursors of clients that apply no CallerAccessDelta.
CallerAccessRef *StateRef `protobuf:"bytes,20,opt,name=caller_access_ref,json=callerAccessRef,proto3" json:"caller_access_ref,omitempty"`
// Keyed hash of seq and access_moves_through under the seq_key of the
// ReadAccess that access_ref names. A resync from that entry reads only
// rows at or below seq, and a client can edit seq, so the resync trusts
// the two values only when the tag matches; otherwise the client resets.
// 0 when access_ref is absent, and on cursors older than the field.
AccessTag uint64 `protobuf:"fixed64,21,opt,name=access_tag,json=accessTag,proto3" json:"access_tag,omitempty"`
// Keyed hash of seq and filter_epoch under the seq_key of the StoredSets
// entry that sets_ref names. A resync after a change of filter epoch
// classifies the old side with the read filters at filter_epoch and reads
// only rows at or below seq, and a client can edit both, so the resync
// trusts the two values only when the tag matches; otherwise the client
// resets. 0 when sets_ref is absent, and on cursors older than the field.
EpochTag uint64 `protobuf:"fixed64,22,opt,name=epoch_tag,json=epochTag,proto3" json:"epoch_tag,omitempty"`
// The lineage mark of the write transaction that allocated seq: a random
// value per committed write. The store epoch survives a restore from
// backup, so it cannot tell the restored history from the one the client
// followed; the mark can, because the restored store writes the
// sequences after the backup point again under new marks. Pull resets a
// cursor whose mark differs from the one the store holds for seq. 0 = no
// mark known (a cursor older than the field, a sequence written before the
// store recorded marks, or one whose record GC removed), always accepted.
SeqLineage uint64 `protobuf:"fixed64,23,opt,name=seq_lineage,json=seqLineage,proto3" json:"seq_lineage,omitempty"`
// contains filtered or unexported fields
}
Cursor is the server's pull-position state.
func (*Cursor) Descriptor
deprecated
func (*Cursor) GetAccessHash ¶ added in v0.2.0
func (*Cursor) GetAccessMovesThrough ¶ added in v0.2.0
func (*Cursor) GetAccessPolicy ¶ added in v0.2.0
func (*Cursor) GetAccessRef ¶ added in v0.2.0
func (*Cursor) GetAccessTag ¶ added in v0.2.0
func (*Cursor) GetCallerAccessHash ¶ added in v0.2.0
func (*Cursor) GetCallerAccessRef ¶ added in v0.2.0
func (*Cursor) GetClosure ¶
func (x *Cursor) GetClosure() *ClosureSet
func (*Cursor) GetClosureRebuild ¶
func (*Cursor) GetEpochTag ¶ added in v0.2.0
func (*Cursor) GetFilterEpoch ¶
func (*Cursor) GetPartialEntity ¶
func (*Cursor) GetPartialKey ¶
func (*Cursor) GetResync ¶
func (x *Cursor) GetResync() *ResyncState
func (*Cursor) GetResynced ¶
func (*Cursor) GetSeqLineage ¶ added in v0.3.0
func (*Cursor) GetSetsRef ¶
func (*Cursor) GetStoreEpoch ¶
func (*Cursor) GetSubHash ¶
func (*Cursor) GetSubscriptions ¶
func (x *Cursor) GetSubscriptions() []*v1.Subscription
func (*Cursor) GetWindow ¶
func (x *Cursor) GetWindow() *ClosureSet
func (*Cursor) GetWindows ¶
func (x *Cursor) GetWindows() []*WindowState
func (*Cursor) ProtoMessage ¶
func (*Cursor) ProtoMessage()
func (*Cursor) ProtoReflect ¶
func (x *Cursor) ProtoReflect() protoreflect.Message
type EntityReadRule ¶ added in v0.2.0
type EntityReadRule struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// Set for an entity outside the access model, whose rows every admitted
// caller reads.
Open bool `protobuf:"varint,3,opt,name=open,proto3" json:"open,omitempty"`
// Who reads the rows.
Read *ReadersRule `protobuf:"bytes,4,opt,name=read,proto3" json:"read,omitempty"`
// The access parents, one per reference case, sorted by path and entity.
Parents []*ParentCase `protobuf:"bytes,5,rep,name=parents,proto3" json:"parents,omitempty"`
// The guards that can hide fields, sorted by their units.
Hides []*HidingGuard `protobuf:"bytes,6,rep,name=hides,proto3" json:"hides,omitempty"`
// contains filtered or unexported fields
}
EntityReadRule is what decides which rows of one entity a caller reads, and which of their fields: who reads them, through which access parents, and what each guard that can hide fields admits. Two equal rules read the same rows and fields from the same anchors. A rule feature added later is a new field, which a rule that does not use it leaves unset.
func (*EntityReadRule) Descriptor
deprecated
added in
v0.2.0
func (*EntityReadRule) Descriptor() ([]byte, []int)
Deprecated: Use EntityReadRule.ProtoReflect.Descriptor instead.
func (*EntityReadRule) GetEntity ¶ added in v0.2.0
func (x *EntityReadRule) GetEntity() string
func (*EntityReadRule) GetHides ¶ added in v0.2.0
func (x *EntityReadRule) GetHides() []*HidingGuard
func (*EntityReadRule) GetOpen ¶ added in v0.2.0
func (x *EntityReadRule) GetOpen() bool
func (*EntityReadRule) GetParents ¶ added in v0.2.0
func (x *EntityReadRule) GetParents() []*ParentCase
func (*EntityReadRule) GetRead ¶ added in v0.2.0
func (x *EntityReadRule) GetRead() *ReadersRule
func (*EntityReadRule) ProtoMessage ¶ added in v0.2.0
func (*EntityReadRule) ProtoMessage()
func (*EntityReadRule) ProtoReflect ¶ added in v0.2.0
func (x *EntityReadRule) ProtoReflect() protoreflect.Message
func (*EntityReadRule) Reset ¶ added in v0.2.0
func (x *EntityReadRule) Reset()
func (*EntityReadRule) String ¶ added in v0.2.0
func (x *EntityReadRule) String() string
type HidingGuard ¶ added in v0.2.0
type HidingGuard struct {
// The units the guard restricts, sorted.
Units []string `protobuf:"bytes,1,rep,name=units,proto3" json:"units,omitempty"`
// Who reads them.
Read *ReadersRule `protobuf:"bytes,2,opt,name=read,proto3" json:"read,omitempty"`
// contains filtered or unexported fields
}
HidingGuard is a guard that can hide fields from a caller.
func (*HidingGuard) Descriptor
deprecated
added in
v0.2.0
func (*HidingGuard) Descriptor() ([]byte, []int)
Deprecated: Use HidingGuard.ProtoReflect.Descriptor instead.
func (*HidingGuard) GetRead ¶ added in v0.2.0
func (x *HidingGuard) GetRead() *ReadersRule
func (*HidingGuard) GetUnits ¶ added in v0.2.0
func (x *HidingGuard) GetUnits() []string
func (*HidingGuard) ProtoMessage ¶ added in v0.2.0
func (*HidingGuard) ProtoMessage()
func (*HidingGuard) ProtoReflect ¶ added in v0.2.0
func (x *HidingGuard) ProtoReflect() protoreflect.Message
func (*HidingGuard) Reset ¶ added in v0.2.0
func (x *HidingGuard) Reset()
func (*HidingGuard) String ¶ added in v0.2.0
func (x *HidingGuard) String() string
type ParentCase ¶ added in v0.2.0
type ParentCase struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Entity string `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
// contains filtered or unexported fields
}
ParentCase is one case of an entity's access parent: the reference that names the parent row, and the parent's entity.
func (*ParentCase) Descriptor
deprecated
added in
v0.2.0
func (*ParentCase) Descriptor() ([]byte, []int)
Deprecated: Use ParentCase.ProtoReflect.Descriptor instead.
func (*ParentCase) GetEntity ¶ added in v0.2.0
func (x *ParentCase) GetEntity() string
func (*ParentCase) GetPath ¶ added in v0.2.0
func (x *ParentCase) GetPath() string
func (*ParentCase) ProtoMessage ¶ added in v0.2.0
func (*ParentCase) ProtoMessage()
func (*ParentCase) ProtoReflect ¶ added in v0.2.0
func (x *ParentCase) ProtoReflect() protoreflect.Message
func (*ParentCase) Reset ¶ added in v0.2.0
func (x *ParentCase) Reset()
func (*ParentCase) String ¶ added in v0.2.0
func (x *ParentCase) String() string
type PermissionAnchors ¶ added in v0.2.0
type PermissionAnchors struct {
Permission string `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"`
// Held at the workspace root, which covers every row.
Root bool `protobuf:"varint,2,opt,name=root,proto3" json:"root,omitempty"`
// The anchor rows, per entity, sorted by entity and key.
Rows []*ClosureSet_Entry `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"`
// contains filtered or unexported fields
}
PermissionAnchors is where a caller held one permission.
func (*PermissionAnchors) Descriptor
deprecated
added in
v0.2.0
func (*PermissionAnchors) Descriptor() ([]byte, []int)
Deprecated: Use PermissionAnchors.ProtoReflect.Descriptor instead.
func (*PermissionAnchors) GetPermission ¶ added in v0.2.0
func (x *PermissionAnchors) GetPermission() string
func (*PermissionAnchors) GetRoot ¶ added in v0.2.0
func (x *PermissionAnchors) GetRoot() bool
func (*PermissionAnchors) GetRows ¶ added in v0.2.0
func (x *PermissionAnchors) GetRows() []*ClosureSet_Entry
func (*PermissionAnchors) ProtoMessage ¶ added in v0.2.0
func (*PermissionAnchors) ProtoMessage()
func (*PermissionAnchors) ProtoReflect ¶ added in v0.2.0
func (x *PermissionAnchors) ProtoReflect() protoreflect.Message
func (*PermissionAnchors) Reset ¶ added in v0.2.0
func (x *PermissionAnchors) Reset()
func (*PermissionAnchors) String ¶ added in v0.2.0
func (x *PermissionAnchors) String() string
type ReadAccess ¶ added in v0.2.0
type ReadAccess struct {
// The caller's subjects. A cursor presented by a caller with other subjects
// cannot resync from this entry.
Subjects []string `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"`
// One entry per permission that some entity reads by, sorted by permission.
Permissions []*PermissionAnchors `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"`
// The read rule of every entity in the access model the entry was recorded
// under, sorted by entity. They and max_access_depth hash to
// Cursor.access_policy, and Cursor.access_hash leaves them out.
Rules []*EntityReadRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
// The longest parent chain a read walks (Limits.MaxAccessDepth). A cursor
// recorded under another limit cannot resync from this entry.
MaxAccessDepth uint32 `protobuf:"varint,4,opt,name=max_access_depth,json=maxAccessDepth,proto3" json:"max_access_depth,omitempty"`
// Random key that Cursor.access_tag is computed with. It never leaves the
// server, so a client cannot compute the tag of another position. Neither
// hash reads it.
SeqKey []byte `protobuf:"bytes,5,opt,name=seq_key,json=seqKey,proto3" json:"seq_key,omitempty"`
// contains filtered or unexported fields
}
ReadAccess is what a caller could read when a cursor was issued, stored in the cursor-state store under Cursor.access_ref. Every list is sorted, so equal access holds equal values. Cursor.access_hash and Cursor.access_policy hash the engine's canonical encoding of it, which reads the field values by field number and not the encoded bytes, so a field that is not set leaves both hashes as they were.
func (*ReadAccess) Descriptor
deprecated
added in
v0.2.0
func (*ReadAccess) Descriptor() ([]byte, []int)
Deprecated: Use ReadAccess.ProtoReflect.Descriptor instead.
func (*ReadAccess) GetMaxAccessDepth ¶ added in v0.2.0
func (x *ReadAccess) GetMaxAccessDepth() uint32
func (*ReadAccess) GetPermissions ¶ added in v0.2.0
func (x *ReadAccess) GetPermissions() []*PermissionAnchors
func (*ReadAccess) GetRules ¶ added in v0.2.0
func (x *ReadAccess) GetRules() []*EntityReadRule
func (*ReadAccess) GetSeqKey ¶ added in v0.2.0
func (x *ReadAccess) GetSeqKey() []byte
func (*ReadAccess) GetSubjects ¶ added in v0.2.0
func (x *ReadAccess) GetSubjects() []string
func (*ReadAccess) ProtoMessage ¶ added in v0.2.0
func (*ReadAccess) ProtoMessage()
func (*ReadAccess) ProtoReflect ¶ added in v0.2.0
func (x *ReadAccess) ProtoReflect() protoreflect.Message
func (*ReadAccess) Reset ¶ added in v0.2.0
func (x *ReadAccess) Reset()
func (*ReadAccess) String ¶ added in v0.2.0
func (x *ReadAccess) String() string
type ReadersRule ¶ added in v0.2.0
type ReadersRule struct {
// Every admitted caller reads every row.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// The permissions of the rules that check nothing on the row, sorted.
Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"`
// The rules with a check on the row or above it, or that need more than
// one permission, in the engine's order.
Checked []*CheckedRule `protobuf:"bytes,3,rep,name=checked,proto3" json:"checked,omitempty"`
// contains filtered or unexported fields
}
ReadersRule is who reads the rows of an entity, or the fields of a guard.
func (*ReadersRule) Descriptor
deprecated
added in
v0.2.0
func (*ReadersRule) Descriptor() ([]byte, []int)
Deprecated: Use ReadersRule.ProtoReflect.Descriptor instead.
func (*ReadersRule) GetAll ¶ added in v0.2.0
func (x *ReadersRule) GetAll() bool
func (*ReadersRule) GetChecked ¶ added in v0.2.0
func (x *ReadersRule) GetChecked() []*CheckedRule
func (*ReadersRule) GetPermissions ¶ added in v0.2.0
func (x *ReadersRule) GetPermissions() []string
func (*ReadersRule) ProtoMessage ¶ added in v0.2.0
func (*ReadersRule) ProtoMessage()
func (*ReadersRule) ProtoReflect ¶ added in v0.2.0
func (x *ReadersRule) ProtoReflect() protoreflect.Message
func (*ReadersRule) Reset ¶ added in v0.2.0
func (x *ReadersRule) Reset()
func (*ReadersRule) String ¶ added in v0.2.0
func (x *ReadersRule) String() string
type ResyncState ¶
type ResyncState struct {
// Scan position: the next page resumes at the first subscribed entity
// >= entity, skipping keys <= after_key within it.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
AfterKey string `protobuf:"bytes,2,opt,name=after_key,json=afterKey,proto3" json:"after_key,omitempty"`
// The scope the resync converges on. Each resync pull must still carry a
// subscription set hashing to to_sub_hash and find the workspace at
// to_filter_epoch; any further change mid-resync falls back to reset.
ToSubHash uint64 `protobuf:"fixed64,3,opt,name=to_sub_hash,json=toSubHash,proto3" json:"to_sub_hash,omitempty"`
ToFilterEpoch uint64 `protobuf:"varint,4,opt,name=to_filter_epoch,json=toFilterEpoch,proto3" json:"to_filter_epoch,omitempty"`
// The access hash the resync converges on (see Cursor.access_hash). A pull
// that finds the caller's access moved again mid-resync resets.
ToAccessHash uint64 `protobuf:"fixed64,5,opt,name=to_access_hash,json=toAccessHash,proto3" json:"to_access_hash,omitempty"`
// The newest access move the resync accounts for (see AccessMove). A pull
// that finds a later move that changes what the client can read resets.
ToMovesThrough uint64 `protobuf:"varint,6,opt,name=to_moves_through,json=toMovesThrough,proto3" json:"to_moves_through,omitempty"`
// contains filtered or unexported fields
}
ResyncState marks a cursor mid delta-resync: the difference between the client's old visible set (under the Cursor's seq / sub_hash / filter_epoch / subscriptions) and its new one is streaming out in (entity, key) scan order. Rows written after the Cursor's seq are not part of the scan; the catch-up pull that follows the resync delivers them under the new scope.
func (*ResyncState) Descriptor
deprecated
func (*ResyncState) Descriptor() ([]byte, []int)
Deprecated: Use ResyncState.ProtoReflect.Descriptor instead.
func (*ResyncState) GetAfterKey ¶
func (x *ResyncState) GetAfterKey() string
func (*ResyncState) GetEntity ¶
func (x *ResyncState) GetEntity() string
func (*ResyncState) GetToAccessHash ¶ added in v0.2.0
func (x *ResyncState) GetToAccessHash() uint64
func (*ResyncState) GetToFilterEpoch ¶
func (x *ResyncState) GetToFilterEpoch() uint64
func (*ResyncState) GetToMovesThrough ¶ added in v0.2.0
func (x *ResyncState) GetToMovesThrough() uint64
func (*ResyncState) GetToSubHash ¶
func (x *ResyncState) GetToSubHash() uint64
func (*ResyncState) ProtoMessage ¶
func (*ResyncState) ProtoMessage()
func (*ResyncState) ProtoReflect ¶
func (x *ResyncState) ProtoReflect() protoreflect.Message
func (*ResyncState) Reset ¶
func (x *ResyncState) Reset()
func (*ResyncState) String ¶
func (x *ResyncState) String() string
type StateRef ¶
type StateRef struct {
Id uint64 `protobuf:"fixed64,1,opt,name=id,proto3" json:"id,omitempty"`
Gen uint64 `protobuf:"fixed64,2,opt,name=gen,proto3" json:"gen,omitempty"`
// contains filtered or unexported fields
}
StateRef names one immutable entry in the cursor-state store. The pair is the identity: id is the lineage a client's successive cursors share (minted when a snapshot starts, carried forward on every reissue, and what lets a store prune a lineage's superseded entries), gen distinguishes the entries within it and is random rather than sequential, so two pulls advancing the same cursor concurrently write two entries instead of colliding on one.
func (*StateRef) Descriptor
deprecated
func (*StateRef) ProtoMessage ¶
func (*StateRef) ProtoMessage()
func (*StateRef) ProtoReflect ¶
func (x *StateRef) ProtoReflect() protoreflect.Message
type StoredSets ¶
type StoredSets struct {
// Cursor.subscriptions.
Subscriptions []*v1.Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// Cursor.closure.
Closure *ClosureSet `protobuf:"bytes,2,opt,name=closure,proto3" json:"closure,omitempty"`
// Cursor.windows.
Windows []*WindowState `protobuf:"bytes,3,rep,name=windows,proto3" json:"windows,omitempty"`
// Cursor.window — carried when adopting a cursor from a server that
// predates `windows`, so nothing is lost in the exchange, and when a
// truncated page carries a union no single window holds.
Window *ClosureSet `protobuf:"bytes,4,opt,name=window,proto3" json:"window,omitempty"`
// Random key that Cursor.epoch_tag is computed with. It never leaves the
// server, so a client cannot compute the tag of another position. Empty on
// entries written before the field.
SeqKey []byte `protobuf:"bytes,5,opt,name=seq_key,json=seqKey,proto3" json:"seq_key,omitempty"`
// contains filtered or unexported fields
}
StoredSets is the bulky tail of a Cursor, stored once instead of restated on every page: the subscription set and both bounded membership key-sets. Encoded deterministically — each key list sorted unless its order is meaningful, as closureRows.keySet and rowEmitter.windowStates emit them — so equal membership produces equal bytes and a reissued cursor keeps its ref instead of writing a new entry.
func (*StoredSets) Descriptor
deprecated
func (*StoredSets) Descriptor() ([]byte, []int)
Deprecated: Use StoredSets.ProtoReflect.Descriptor instead.
func (*StoredSets) GetClosure ¶
func (x *StoredSets) GetClosure() *ClosureSet
func (*StoredSets) GetSeqKey ¶ added in v0.2.0
func (x *StoredSets) GetSeqKey() []byte
func (*StoredSets) GetSubscriptions ¶
func (x *StoredSets) GetSubscriptions() []*v1.Subscription
func (*StoredSets) GetWindow ¶
func (x *StoredSets) GetWindow() *ClosureSet
func (*StoredSets) GetWindows ¶
func (x *StoredSets) GetWindows() []*WindowState
func (*StoredSets) ProtoMessage ¶
func (*StoredSets) ProtoMessage()
func (*StoredSets) ProtoReflect ¶
func (x *StoredSets) ProtoReflect() protoreflect.Message
func (*StoredSets) Reset ¶
func (x *StoredSets) Reset()
func (*StoredSets) String ¶
func (x *StoredSets) String() string
type WindowState ¶
type WindowState struct {
// Index into Cursor.subscriptions of the windowed subscription this
// describes. A pull that cannot line its own subscription list up with the
// cursor's, position for position, rebuilds instead of maintaining.
Subscription uint32 `protobuf:"varint,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
// Member row keys of that subscription's entity.
//
// Ordered best-first for a by_recency window, where the order is
// maintainable for free — every row written since the cursor outranks every
// member, so entering rows go to the front and evictions come off the tail.
// An order_by window cannot place an entering row without reading its
// neighbours, so it locates the tail with `boundary` instead and leaves
// these sorted.
Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
// The weakest member's position in the window's order_by ordering, as the
// bytes query.Order.Cursor produces. Empty for a by_recency window (which
// needs no comparison, see `keys`) and for an empty window.
Boundary []byte `protobuf:"bytes,3,opt,name=boundary,proto3" json:"boundary,omitempty"`
// contains filtered or unexported fields
}
WindowState is one Subscription.window's membership plus the position of its weakest member. The position is what lets a pull decide a changed row's membership by COMPARISON — is it ahead of the tail? — instead of resolving the window from scratch, which costs a read per member however little moved.
func (*WindowState) Descriptor
deprecated
func (*WindowState) Descriptor() ([]byte, []int)
Deprecated: Use WindowState.ProtoReflect.Descriptor instead.
func (*WindowState) GetBoundary ¶
func (x *WindowState) GetBoundary() []byte
func (*WindowState) GetKeys ¶
func (x *WindowState) GetKeys() []string
func (*WindowState) GetSubscription ¶
func (x *WindowState) GetSubscription() uint32
func (*WindowState) ProtoMessage ¶
func (*WindowState) ProtoMessage()
func (*WindowState) ProtoReflect ¶
func (x *WindowState) ProtoReflect() protoreflect.Message
func (*WindowState) Reset ¶
func (x *WindowState) Reset()
func (*WindowState) String ¶
func (x *WindowState) String() string
type WithinRule ¶ added in v0.2.0
type WithinRule struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
CallerIs string `protobuf:"bytes,2,opt,name=caller_is,json=callerIs,proto3" json:"caller_is,omitempty"`
When *v1.Condition `protobuf:"bytes,3,opt,name=when,proto3" json:"when,omitempty"`
// contains filtered or unexported fields
}
WithinRule is one within entry of an access rule.
func (*WithinRule) Descriptor
deprecated
added in
v0.2.0
func (*WithinRule) Descriptor() ([]byte, []int)
Deprecated: Use WithinRule.ProtoReflect.Descriptor instead.
func (*WithinRule) GetCallerIs ¶ added in v0.2.0
func (x *WithinRule) GetCallerIs() string
func (*WithinRule) GetEntity ¶ added in v0.2.0
func (x *WithinRule) GetEntity() string
func (*WithinRule) GetWhen ¶ added in v0.2.0
func (x *WithinRule) GetWhen() *v1.Condition
func (*WithinRule) ProtoMessage ¶ added in v0.2.0
func (*WithinRule) ProtoMessage()
func (*WithinRule) ProtoReflect ¶ added in v0.2.0
func (x *WithinRule) ProtoReflect() protoreflect.Message
func (*WithinRule) Reset ¶ added in v0.2.0
func (x *WithinRule) Reset()
func (*WithinRule) String ¶ added in v0.2.0
func (x *WithinRule) String() string
type WithinState ¶ added in v0.2.0
type WithinState struct {
// The value of each subject field a check reads, by field name.
Subjects map[string]string `` /* 143-byte string literal not displayed */
// The conditions the row matched, each as the canonical form of a check's
// when condition, sorted.
Matched []string `protobuf:"bytes,2,rep,name=matched,proto3" json:"matched,omitempty"`
// contains filtered or unexported fields
}
WithinState is what the within checks that name one entity read of one of its rows.
func (*WithinState) Descriptor
deprecated
added in
v0.2.0
func (*WithinState) Descriptor() ([]byte, []int)
Deprecated: Use WithinState.ProtoReflect.Descriptor instead.
func (*WithinState) GetMatched ¶ added in v0.2.0
func (x *WithinState) GetMatched() []string
func (*WithinState) GetSubjects ¶ added in v0.2.0
func (x *WithinState) GetSubjects() map[string]string
func (*WithinState) ProtoMessage ¶ added in v0.2.0
func (*WithinState) ProtoMessage()
func (*WithinState) ProtoReflect ¶ added in v0.2.0
func (x *WithinState) ProtoReflect() protoreflect.Message
func (*WithinState) Reset ¶ added in v0.2.0
func (x *WithinState) Reset()
func (*WithinState) String ¶ added in v0.2.0
func (x *WithinState) String() string