go-control-plane: github.com/envoyproxy/go-control-plane/pkg/server/sotw/v3 Index | Files

package sotw

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

Package sotw provides an implementation of GRPC SoTW (State of The World) part of XDS server

Index

Package Files

server.go

type Callbacks Uses

type Callbacks interface {
    // OnStreamOpen is called once an 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.
    OnStreamOpen(context.Context, int64, string) error
    // OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
    OnStreamClosed(int64)
    // OnStreamRequest 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.
    OnStreamRequest(int64, *discovery.DiscoveryRequest) error
    // OnStreamResponse is called immediately prior to sending a response on a stream.
    OnStreamResponse(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse)
}

type Server Uses

type Server interface {
    StreamHandler(stream Stream, typeURL string) error
}

func NewServer Uses

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

NewServer creates handlers from a config watcher and callbacks.

type Stream Uses

type Stream interface {
    grpc.ServerStream

    Send(*discovery.DiscoveryResponse) error
    Recv() (*discovery.DiscoveryRequest, error)
}

Generic RPC stream.

Package sotw imports 11 packages (graph) and is imported by 3 packages. Updated 2020-12-19. Refresh now. Tools for package owners.