Categorygithub.com/linkedin/diderot
modulepackage
0.0.5
Repository: https://github.com/linkedin/diderot.git
Documentation: pkg.go.dev

# README

Diderot

(pronounced dee-duh-row)


Diderot is a server implementation of the xDS protocol that makes it extremely easy and efficient to implement a control plane for your Envoy and gRPC services. For the most up-to-date information, please visit the documentation.

Quick Start Guide

The only thing you need to implement to make your resources available via xDS is a diderot.ResourceLocator(link). It is the interface exposed by the ADS server implementation which should contain the business logic of all your resource definitions and how to find them. To facilitate this implementation, Diderot provides an efficient, low-resource cache that supports highly concurrent updates. By leveraging the cache implementation for the heavy lifting, you will be able to focus on the meaningful part of operating your own xDS control plane: your resource definitions.

Once you have implemented your ResourceLocator, you can simply drop in a diderot.ADSServer to your gRPC service, and you're ready to go! Please refer to the examples/quickstart package

Features

Diderot's ADS server implementation is a faithful implementation of the xDS protocol. This means it implements both the State-of-the-World and Delta/Incremental variants. It supports advanced features such as glob collections, unlocking the more efficient alternative to the EDS stage: LEDS (design doc).

# Packages

Package ads provides a set of utilities and definitions around the Aggregated Discovery Service xDS protocol (ADS), such as convenient type aliases, constants and core definitions.
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

IsSubscribedTo checks whether the given handler is subscribed to the given named resource by invoking the underlying generic API [diderot.Cache.IsSubscribedTo].
NewADSServer creates a new [*ADSServer] with the given options.
NewCache returns a simple Cache with only 1 priority (see NewPrioritizedCache).
NewPrioritizedCache creates a series of Cache accessors that all point to the same underlying cache, but have different "priorities".
NodeFromContext returns the [ads.Node] in the given context, if it exists.
Subscribe registers the handler as a subscriber of the given named resource by invoking the underlying generic API [diderot.Cache.Subscribe].
TypeOf returns a TypeReference that corresponds to the type parameter.
Unsubscribe unregisters the handler as a subscriber of the given named resource by invoking the underlying generic API [diderot.Cache.Unsubscribe].
WithControlPlane causes the server to include the given corev3.ControlPlane instance in each response.
WithGlobalResponseRateLimit enforces a maximum rate at which the server will respond to clients.
WithGranularResponseRateLimit is an additional layer of rate limiting to the one provided by WithGlobalResponseRateLimit.
WithMaxDeltaResponseSize limits the size of responses sent by the server when the Delta variant of the xDS protocol is being used.
WithRequestRateLimit sets the rate limiting parameters for client requests.
WithServerStatsHandler registers a stats handler for the server.

# Structs

An ADSServer is an implementation of the xDS protocol.

# Interfaces

ADSServerOption configures how the ADS Server is initialized.
Cache is the primary type provided by this package.
RawCache is a subset of the [Cache] interface and provides a number of methods to interact with the [Cache] without needing to know the underlying resource type at compile time.
The ResourceLocator abstracts away the business logic used to locate resources and subscribe to them.
Type is a type reference for a type that can be cached.
TypeReference is a superset of the Type interface which captures the actual runtime type.