stream

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamAPIExtensionPluginID = "opni.apiextensions.StreamAPIExtension"
	ServiceID                  = "apiextensions.StreamAPIExtension"
)
View Source
const (
	CorrelationIDHeader = "x-correlation-id"
)

Variables

This section is empty.

Functions

func DiscardReplies added in v0.12.0

func DiscardReplies(any, *streamv1.BroadcastReplyList) error

func NewAgentPlugin added in v0.9.2

func NewAgentPlugin(p StreamAPIExtension) plugin.Plugin

func NewGatewayPlugin added in v0.9.2

func NewGatewayPlugin(p StreamAPIExtension, opts ...GatewayStreamApiExtensionPluginOption) plugin.Plugin

Types

type Aggregator added in v0.8.2

type Aggregator func(reply any, msg *streamv1.BroadcastReplyList) error

Aggregator allows the user to aggregate the responses from a broadcast request, and store the result in reply.

type GatewayStreamApiExtensionPluginOption added in v0.9.2

type GatewayStreamApiExtensionPluginOption func(*GatewayStreamApiExtensionPluginOptions)

type GatewayStreamApiExtensionPluginOptions added in v0.9.2

type GatewayStreamApiExtensionPluginOptions struct {
	// contains filtered or unexported fields
}

type GatewayStreamMetricsConfig added in v0.9.2

type GatewayStreamMetricsConfig struct {
	// Prometheus registerer
	Reader metric.Reader

	// A function called on each stream's Connect that returns a list of static
	// labels to attach to all metrics collected for that stream.
	LabelsForStream func(context.Context) []attribute.KeyValue
}

type Server

type Server struct {
	Desc              *grpc.ServiceDesc
	Impl              interface{}
	RequireCapability string
}

type StreamAPIExtension

type StreamAPIExtension interface {
	StreamServers() []Server
}

type StreamAPIExtensionWithHandlers added in v0.11.0

type StreamAPIExtensionWithHandlers interface {
	StreamAPIExtension
	StreamClientHandler
}

type StreamClientHandler

type StreamClientHandler interface {
	UseStreamClient(client grpc.ClientConnInterface)
}

A plugin can optionally implement StreamClientHandler to obtain a grpc.ClientConnInterface to the plugin's side of the spliced stream.

type StreamDelegate added in v0.8.2

type StreamDelegate[T any] interface {
	WithTarget(*corev1.Reference) T
	WithBroadcastSelector(*corev1.ClusterSelector, Aggregator) T
}

func NewDelegate added in v0.8.2

func NewDelegate[T any](cc grpc.ClientConnInterface, newClientFunc func(grpc.ClientConnInterface) T) StreamDelegate[T]

Jump to

Keyboard shortcuts

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