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

package server

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

Package server provides an implementation of a streaming xDS server.

Index

Package Files

gateway.go server.go

type CallbackFuncs Uses

type CallbackFuncs struct {
    StreamOpenFunc     func(context.Context, int64, string) error
    StreamClosedFunc   func(int64)
    StreamRequestFunc  func(int64, *discovery.DiscoveryRequest) error
    StreamResponseFunc func(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse)
    FetchRequestFunc   func(context.Context, *discovery.DiscoveryRequest) error
    FetchResponseFunc  func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse)
}

CallbackFuncs is a convenience type for implementing the Callbacks interface.

func (CallbackFuncs) OnFetchRequest Uses

func (c CallbackFuncs) OnFetchRequest(ctx context.Context, req *discovery.DiscoveryRequest) error

OnFetchRequest invokes FetchRequestFunc.

func (CallbackFuncs) OnFetchResponse Uses

func (c CallbackFuncs) OnFetchResponse(req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse)

OnFetchResponse invoked FetchResponseFunc.

func (CallbackFuncs) OnStreamClosed Uses

func (c CallbackFuncs) OnStreamClosed(streamID int64)

OnStreamClosed invokes StreamClosedFunc.

func (CallbackFuncs) OnStreamOpen Uses

func (c CallbackFuncs) OnStreamOpen(ctx context.Context, streamID int64, typeURL string) error

OnStreamOpen invokes StreamOpenFunc.

func (CallbackFuncs) OnStreamRequest Uses

func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryRequest) error

OnStreamRequest invokes StreamRequestFunc.

func (CallbackFuncs) OnStreamResponse Uses

func (c CallbackFuncs) OnStreamResponse(streamID int64, req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse)

OnStreamResponse invokes StreamResponseFunc.

type Callbacks Uses

type Callbacks interface {
    rest.Callbacks
    sotw.Callbacks
}

Callbacks is a collection of callbacks inserted into the server operation. The callbacks are invoked synchronously.

type HTTPGateway Uses

type HTTPGateway struct {
    // Log is an optional log for errors in response write
    Log log.Logger

    // Server is the underlying gRPC server
    Server Server
}

HTTPGateway is a custom implementation of [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) specialized to Envoy xDS API.

func (*HTTPGateway) ServeHTTP Uses

func (h *HTTPGateway) ServeHTTP(req *http.Request) ([]byte, int, error)

type Server Uses

type Server interface {
    endpointservice.EndpointDiscoveryServiceServer
    clusterservice.ClusterDiscoveryServiceServer
    routeservice.RouteDiscoveryServiceServer
    listenerservice.ListenerDiscoveryServiceServer
    discoverygrpc.AggregatedDiscoveryServiceServer
    secretservice.SecretDiscoveryServiceServer
    runtimeservice.RuntimeDiscoveryServiceServer

    rest.Server
    sotw.Server
}

Server is a collection of handlers for streaming discovery requests.

func NewServer Uses

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

NewServer creates handlers from a config watcher and callbacks.

func NewServerAdvanced Uses

func NewServerAdvanced(restServer rest.Server, sotwServer sotw.Server) Server

Package server imports 23 packages (graph) and is imported by 21 packages. Updated 2020-12-19. Refresh now. Tools for package owners.