Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromEtcdResponseHeader ¶
func FromEtcdResponseHeader(h epb.ResponseHeader) pb.Header_Etcd
FromEtcdResponseHeader converts an etcd ResponseHeader to an equivalent Header_Etcd.
func JournalRouteMatchesAssignments ¶
func JournalRouteMatchesAssignments(rt BrokerRoute, assignments keyspace.KeyValues) bool
JournalRouteMatchesAssignments returns true iff the Route is equivalent to the Route marshaled with each of the journal's |assignments|.
func NewUnroutedHeader ¶
NewUnroutedHeader returns a Header with its ProcessId and Etcd fields derived from the v3_allocator.State, and Route left as zero-valued. It is a helper for APIs which do not utilize item resolution but still return Headers (eg, List and Update).
Types ¶
type BrokerJournalSpec ¶
type BrokerJournalSpec struct {
JournalSpec pb.JournalSpec
}
func (*BrokerJournalSpec) DesiredReplication ¶
func (m *BrokerJournalSpec) DesiredReplication() int
DesiredReplication returns the configured Replication of the spec. It implements allocator.ItemValue.
func (*BrokerJournalSpec) IsConsistent ¶
IsConsistent returns true if the Route stored under each of |assignments| agrees with the Route implied by the |assignments| keys. It implements allocator.ItemValue.
type BrokerRoute ¶
BrokerRoute extends protocol.Route allowing initialization from allocator assignments and attaching endpoints from a keyspace
func (*BrokerRoute) AttachEndpoints ¶
func (m *BrokerRoute) AttachEndpoints(ks *keyspace.KeySpace)
AttachEndpoints maps Route members through the KeySpace to their respective specs, and attaches the associated Endpoint of each to the Route. KeySpace must already be read-locked.
func (BrokerRoute) Equivalent ¶
func (m BrokerRoute) Equivalent(other *BrokerRoute) bool
func (*BrokerRoute) Init ¶
func (m *BrokerRoute) Init(assignments keyspace.KeyValues)
Init Initializes Route with the provided allocator Assignments.