package delta

import "github.com/envoyproxy/go-control-plane/pkg/server/delta/v3"

Index

Types

type Callbacks

type Callbacks interface {
	// OnDeltaStreamOpen is called once an incremental xDS stream is open with a stream ID and the type URL (or "" for ADS).
	// Returning an error will end processing and close the stream. OnStreamClosed will still be called.
	OnDeltaStreamOpen(context.Context, int64, string) error
	// OnDeltaStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
	OnDeltaStreamClosed(int64, *core.Node)
	// OnStreamDeltaRequest is called once a request is received on a stream.
	// Returning an error will end processing and close the stream. OnStreamClosed will still be called.
	OnStreamDeltaRequest(int64, *discovery.DeltaDiscoveryRequest) error
	// OnStreamDeltaResponse is called immediately prior to sending a response on a stream.
	OnStreamDeltaResponse(int64, *discovery.DeltaDiscoveryRequest, *discovery.DeltaDiscoveryResponse)
}

type Server

type Server interface {
	DeltaStreamHandler(stream stream.DeltaStream, typeURL string) error
}

Server is a wrapper interface which is meant to hold the proper stream handler for each xDS protocol.

func NewServer

func NewServer(ctx context.Context, config cache.ConfigWatcher, callbacks Callbacks, opts ...config.XDSOption) Server

NewServer creates a delta xDS specific server which utilizes a ConfigWatcher and delta Callbacks.

Source Files

server.go watches.go

Version
v0.13.4 (latest)
Published
Jan 6, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
12 minutes ago

Tools for package owners.