callbacks

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks interface {
	// OnStreamOpen is called once an HDS stream is open with a stream ID and context
	// Returning an error will end processing and close the stream. OnStreamClosed will still be called.
	OnStreamOpen(ctx context.Context, streamID int64) error

	// OnHealthCheckRequest is called when Envoy sends HealthCheckRequest with Node and Capabilities
	OnHealthCheckRequest(streamID int64, request *envoy_service_health.HealthCheckRequest) error

	// OnEndpointHealthResponse is called when there is a response from Envoy with status of endpoints in the cluster
	OnEndpointHealthResponse(streamID int64, response *envoy_service_health.EndpointHealthResponse) error

	// OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
	OnStreamClosed(int64)
}

type Chain

type Chain []Callbacks

func (Chain) OnEndpointHealthResponse

func (chain Chain) OnEndpointHealthResponse(streamID int64, response *envoy_service_health.EndpointHealthResponse) error

func (Chain) OnHealthCheckRequest

func (chain Chain) OnHealthCheckRequest(streamID int64, request *envoy_service_health.HealthCheckRequest) error

func (Chain) OnStreamClosed

func (chain Chain) OnStreamClosed(streamID int64)

func (Chain) OnStreamOpen

func (chain Chain) OnStreamOpen(ctx context.Context, streamID int64) error

Jump to

Keyboard shortcuts

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