core: Index | Files

package ext

import ""

Package ext defines extensions to broker/protocol that depend on keyspace and allocator (which in turn depend on etcd). This package has been separated from broker/protocol and broker/client to avoid incurring the dependency on etcd for client users.


Package Files

doc.go header_extensions.go route_extensions.go

func AttachEndpoints Uses

func AttachEndpoints(route *pb.Route, 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 FromEtcdResponseHeader Uses

func FromEtcdResponseHeader(h epb.ResponseHeader) pb.Header_Etcd

FromEtcdResponseHeader converts an etcd ResponseHeader to an equivalent Header_Etcd.

func Init Uses

func Init(route *pb.Route, assignments keyspace.KeyValues)

Init Initializes Route with the provided allocator Assignments.

func NewUnroutedHeader Uses

func NewUnroutedHeader(s *allocator.State) (hdr pb.Header)

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

Package ext imports 4 packages (graph) and is imported by 8 packages. Updated 2020-01-21. Refresh now. Tools for package owners.