Documentation
¶
Index ¶
- Variables
- type Changed
- func (*Changed) Descriptor() ([]byte, []int)deprecated
- func (x *Changed) GetGroup() string
- func (x *Changed) GetJoined() []*v1.PID
- func (x *Changed) GetLeft() []*v1.PID
- func (*Changed) ProtoMessage()
- func (x *Changed) ProtoReflect() protoreflect.Message
- func (x *Changed) Reset()
- func (x *Changed) String() string
- type Found
- type Group
- func (*Group) Descriptor() ([]byte, []int)deprecated
- func (x *Group) GetLocal() uint32
- func (x *Group) GetMembers() uint32
- func (x *Group) GetName() string
- func (x *Group) GetNodes() uint32
- func (*Group) ProtoMessage()
- func (x *Group) ProtoReflect() protoreflect.Message
- func (x *Group) Reset()
- func (x *Group) String() string
- type Hello
- type Join
- type Leave
- type Listing
- type Lost
- type MemberEvent
- func (*MemberEvent) Descriptor() ([]byte, []int)deprecated
- func (x *MemberEvent) GetIncarnation() uint64
- func (x *MemberEvent) GetNode() string
- func (x *MemberEvent) GetSelected() bool
- func (x *MemberEvent) GetUp() bool
- func (*MemberEvent) ProtoMessage()
- func (x *MemberEvent) ProtoReflect() protoreflect.Message
- func (x *MemberEvent) Reset()
- func (x *MemberEvent) String() string
- type Members
- type Peer
- func (*Peer) Descriptor() ([]byte, []int)deprecated
- func (x *Peer) GetMembers() uint32
- func (x *Peer) GetNode() string
- func (x *Peer) GetScope() *v1.PID
- func (x *Peer) GetState() string
- func (*Peer) ProtoMessage()
- func (x *Peer) ProtoReflect() protoreflect.Message
- func (x *Peer) Reset()
- func (x *Peer) String() string
- type Query
- type Report
- func (*Report) Descriptor() ([]byte, []int)deprecated
- func (x *Report) GetGroups() []*Group
- func (x *Report) GetMembers() []*v1.PID
- func (x *Report) GetOmitted() uint32
- func (x *Report) GetPeers() []*Peer
- func (x *Report) GetScope() string
- func (*Report) ProtoMessage()
- func (x *Report) ProtoReflect() protoreflect.Message
- func (x *Report) Reset()
- func (x *Report) String() string
- type Retry
- type Sync
- func (*Sync) Descriptor() ([]byte, []int)deprecated
- func (x *Sync) GetFirst() bool
- func (x *Sync) GetGroups() []*Members
- func (x *Sync) GetMore() bool
- func (x *Sync) GetScope() *v1.PID
- func (*Sync) ProtoMessage()
- func (x *Sync) ProtoReflect() protoreflect.Message
- func (x *Sync) Reset()
- func (x *Sync) String() string
- type Unwatch
- type Update
- type Watch
- type Watching
Constants ¶
This section is empty.
Variables ¶
var File_grpcproc_groups_v1_groups_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Changed ¶
type Changed struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Joined []*v1.PID `protobuf:"bytes,2,rep,name=joined,proto3" json:"joined,omitempty"`
Left []*v1.PID `protobuf:"bytes,3,rep,name=left,proto3" json:"left,omitempty"`
// contains filtered or unexported fields
}
Changed tells a watcher who joined and who left a group.
func (*Changed) Descriptor
deprecated
func (*Changed) ProtoMessage ¶
func (*Changed) ProtoMessage()
func (*Changed) ProtoReflect ¶
func (x *Changed) ProtoReflect() protoreflect.Message
type Found ¶
type Found struct {
Scope *v1.PID `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
// contains filtered or unexported fields
}
Found is a relay telling its scope that the other node's scope answered its Hello, and that it watches that scope now.
func (*Found) Descriptor
deprecated
func (*Found) ProtoMessage ¶
func (*Found) ProtoMessage()
func (*Found) ProtoReflect ¶
func (x *Found) ProtoReflect() protoreflect.Message
type Group ¶
type Group struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Members on every node.
Members uint32 `protobuf:"varint,2,opt,name=members,proto3" json:"members,omitempty"`
// Members on the scope's node.
Local uint32 `protobuf:"varint,3,opt,name=local,proto3" json:"local,omitempty"`
// Nodes with a member.
Nodes uint32 `protobuf:"varint,4,opt,name=nodes,proto3" json:"nodes,omitempty"`
// contains filtered or unexported fields
}
Group is a group as a scope knows it.
func (*Group) Descriptor
deprecated
func (*Group) GetMembers ¶
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
func (*Group) ProtoReflect ¶
func (x *Group) ProtoReflect() protoreflect.Message
type Hello ¶
type Hello struct {
Scope *v1.PID `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
// contains filtered or unexported fields
}
Hello, as a call from a scope's relay to the scope of the same name on another node, asks for that scope's members; the answer is a Hello that names the scope answering. The scope called then sends its members to the caller's scope, which the call's Hello names.
func (*Hello) Descriptor
deprecated
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
type Join ¶
type Join struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Pids []*v1.PID `protobuf:"bytes,2,rep,name=pids,proto3" json:"pids,omitempty"`
// contains filtered or unexported fields
}
Join, as a call to a scope, adds processes of the scope's node to a group.
func (*Join) Descriptor
deprecated
func (*Join) ProtoMessage ¶
func (*Join) ProtoMessage()
func (*Join) ProtoReflect ¶
func (x *Join) ProtoReflect() protoreflect.Message
type Leave ¶
type Leave struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Pids []*v1.PID `protobuf:"bytes,2,rep,name=pids,proto3" json:"pids,omitempty"`
// contains filtered or unexported fields
}
Leave, as a call to a scope, removes processes of the scope's node from a group.
func (*Leave) Descriptor
deprecated
func (*Leave) ProtoMessage ¶
func (*Leave) ProtoMessage()
func (*Leave) ProtoReflect ¶
func (x *Leave) ProtoReflect() protoreflect.Message
type Listing ¶
type Listing struct {
// contains filtered or unexported fields
}
Listing is a scope's membership watch telling it that a new list of the members begins: what an earlier watch listed is listed again.
func (*Listing) Descriptor
deprecated
func (*Listing) ProtoMessage ¶
func (*Listing) ProtoMessage()
func (*Listing) ProtoReflect ¶
func (x *Listing) ProtoReflect() protoreflect.Message
type Lost ¶
type Lost struct {
// The scope that is gone; unset when Hello was not answered.
Scope *v1.PID `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
// Why: noproc when that node runs no such scope, noconnection when it
// cannot be reached, or the exit reason of the scope it watched.
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
// contains filtered or unexported fields
}
Lost is a relay telling its scope that the other node's scope did not answer, or that the scope it watched is gone, and that the relay ends.
func (*Lost) Descriptor
deprecated
func (*Lost) ProtoMessage ¶
func (*Lost) ProtoMessage()
func (*Lost) ProtoReflect ¶
func (x *Lost) ProtoReflect() protoreflect.Message
type MemberEvent ¶
type MemberEvent struct {
Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
Up bool `protobuf:"varint,2,opt,name=up,proto3" json:"up,omitempty"`
Selected bool `protobuf:"varint,3,opt,name=selected,proto3" json:"selected,omitempty"`
// Which incarnation Membership reported; 0 for whichever.
Incarnation uint64 `protobuf:"varint,4,opt,name=incarnation,proto3" json:"incarnation,omitempty"`
// contains filtered or unexported fields
}
MemberEvent is a scope's membership watch telling it of a node that is up, and whether Select takes it, or of one that left the cluster.
func (*MemberEvent) Descriptor
deprecated
func (*MemberEvent) Descriptor() ([]byte, []int)
Deprecated: Use MemberEvent.ProtoReflect.Descriptor instead.
func (*MemberEvent) GetIncarnation ¶
func (x *MemberEvent) GetIncarnation() uint64
func (*MemberEvent) GetNode ¶
func (x *MemberEvent) GetNode() string
func (*MemberEvent) GetSelected ¶
func (x *MemberEvent) GetSelected() bool
func (*MemberEvent) GetUp ¶
func (x *MemberEvent) GetUp() bool
func (*MemberEvent) ProtoMessage ¶
func (*MemberEvent) ProtoMessage()
func (*MemberEvent) ProtoReflect ¶
func (x *MemberEvent) ProtoReflect() protoreflect.Message
func (*MemberEvent) Reset ¶
func (x *MemberEvent) Reset()
func (*MemberEvent) String ¶
func (x *MemberEvent) String() string
type Members ¶
type Members struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Ids []uint64 `protobuf:"varint,2,rep,packed,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
Members are processes of the sender's node in a group, by id: their incarnation is the sender's.
func (*Members) Descriptor
deprecated
func (*Members) ProtoMessage ¶
func (*Members) ProtoMessage()
func (*Members) ProtoReflect ¶
func (x *Members) ProtoReflect() protoreflect.Message
type Peer ¶
type Peer struct {
Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
// syncing: asked, its members not yet known; synced: its members are
// known; absent: it runs no such scope; unreachable: lost, and asked
// again later.
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
// Its scope, once it synced.
Scope *v1.PID `protobuf:"bytes,3,opt,name=scope,proto3" json:"scope,omitempty"`
// Its members, in every group.
Members uint32 `protobuf:"varint,4,opt,name=members,proto3" json:"members,omitempty"`
// contains filtered or unexported fields
}
Peer is another node's scope, as this one knows it.
func (*Peer) Descriptor
deprecated
func (*Peer) GetMembers ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) ProtoReflect ¶
func (x *Peer) ProtoReflect() protoreflect.Message
type Query ¶
type Query struct {
// One group's members; unset, the groups.
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
// Only the groups whose names start with this.
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
// At most this many groups, or members of the group, ordered; 0 is 1000.
Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// contains filtered or unexported fields
}
Query, asked of a scope (grpcproc.WithQuery), is answered with a Report: its groups, or with a group the members of it.
func (*Query) Descriptor
deprecated
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) ProtoReflect ¶
func (x *Query) ProtoReflect() protoreflect.Message
type Report ¶
type Report struct {
Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
// The groups with members, by name, when no group was asked.
Groups []*Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
// The group's members, when one was asked, ordered.
Members []*v1.PID `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"`
// How many groups, or members, were left out past the limit.
Omitted uint32 `protobuf:"varint,4,opt,name=omitted,proto3" json:"omitted,omitempty"`
// The other nodes the scope knows, by name.
Peers []*Peer `protobuf:"bytes,5,rep,name=peers,proto3" json:"peers,omitempty"`
// contains filtered or unexported fields
}
Report answers Query.
func (*Report) Descriptor
deprecated
func (*Report) GetMembers ¶
func (*Report) GetOmitted ¶
func (*Report) ProtoMessage ¶
func (*Report) ProtoMessage()
func (*Report) ProtoReflect ¶
func (x *Report) ProtoReflect() protoreflect.Message
type Retry ¶
type Retry struct {
Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
// Which of the node's waits it ends: a later one is not ended early.
Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
// contains filtered or unexported fields
}
Retry is a scope's note to itself: to ask an unreachable node again, or, with no node, to watch the membership again.
func (*Retry) Descriptor
deprecated
func (*Retry) ProtoMessage ¶
func (*Retry) ProtoMessage()
func (*Retry) ProtoReflect ¶
func (x *Retry) ProtoReflect() protoreflect.Message
type Sync ¶
type Sync struct {
// The scope whose members these are.
Scope *v1.PID `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
Groups []*Members `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
First bool `protobuf:"varint,3,opt,name=first,proto3" json:"first,omitempty"`
More bool `protobuf:"varint,4,opt,name=more,proto3" json:"more,omitempty"`
// contains filtered or unexported fields
}
Sync, from one scope to another of the same name, lists the sender's local members, which replace those the receiver kept for the sender's node. A long list comes in several, the first with first set and the last with more unset.
func (*Sync) Descriptor
deprecated
func (*Sync) ProtoMessage ¶
func (*Sync) ProtoMessage()
func (*Sync) ProtoReflect ¶
func (x *Sync) ProtoReflect() protoreflect.Message
type Unwatch ¶
type Unwatch struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Unwatch, sent to a scope, ends the sender's watch of a group with that id; one it does not hold is ignored.
func (*Unwatch) Descriptor
deprecated
func (*Unwatch) ProtoMessage ¶
func (*Unwatch) ProtoMessage()
func (*Unwatch) ProtoReflect ¶
func (x *Unwatch) ProtoReflect() protoreflect.Message
type Update ¶
type Update struct {
Joined []*Members `protobuf:"bytes,1,rep,name=joined,proto3" json:"joined,omitempty"`
Left []*Members `protobuf:"bytes,2,rep,name=left,proto3" json:"left,omitempty"`
// contains filtered or unexported fields
}
Update, from one scope to the others after its Sync, says which of its node's processes joined groups, and which left them. A long one comes in several.
func (*Update) Descriptor
deprecated
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶
func (x *Update) ProtoReflect() protoreflect.Message
type Watch ¶
type Watch struct {
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
// Unique among the caller's watches.
Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Watch, as a call to a scope from a process of its node, has it send the caller a Changed for every change to the group, until the caller sends Unwatch with the same id or exits. It is answered with Watching. A process that holds several watches of a group gets one Changed per change.
func (*Watch) Descriptor
deprecated
func (*Watch) ProtoMessage ¶
func (*Watch) ProtoMessage()
func (*Watch) ProtoReflect ¶
func (x *Watch) ProtoReflect() protoreflect.Message
type Watching ¶
type Watching struct {
// The group's members when the watch began, every node's, ordered.
Members []*v1.PID `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"`
// contains filtered or unexported fields
}
Watching answers Watch.
func (*Watching) Descriptor
deprecated
func (*Watching) GetMembers ¶
func (*Watching) ProtoMessage ¶
func (*Watching) ProtoMessage()
func (*Watching) ProtoReflect ¶
func (x *Watching) ProtoReflect() protoreflect.Message