ext

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachEndpoints

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

func FromEtcdResponseHeader(h epb.ResponseHeader) pb.Header_Etcd

FromEtcdResponseHeader converts an etcd ResponseHeader to an equivalent Header_Etcd.

func Init

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

Init Initializes Route with the provided allocator Assignments.

func NewUnroutedHeader

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL