grpc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package grpc manages live gRPC connections to plugin containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool manages a set of live gRPC connections to plugin containers. Connections are keyed by plugin ID. The pool is safe for concurrent use.

func NewPool

func NewPool() *Pool

NewPool creates an empty connection pool.

func (*Pool) Close

func (p *Pool) Close(id string) error

Close closes and removes the connection for the given plugin ID. Returns nil if the connection does not exist.

func (*Pool) CloseAll

func (p *Pool) CloseAll()

CloseAll closes every connection in the pool.

func (*Pool) Dial

func (p *Pool) Dial(ctx context.Context, id, addr string) error

Dial opens a gRPC connection to the plugin at addr and registers it under id. If a connection already exists for id, it is closed first.

func (*Pool) HTTPPluginClient

func (p *Pool) HTTPPluginClient(id string) (pluginsv1.PluginHTTPClient, error)

HTTPPluginClient returns a PluginHTTPClient for the given plugin ID.

func (*Pool) HasConnection

func (p *Pool) HasConnection(id string) bool

HasConnection reports whether a live connection exists for id.

func (*Pool) HealthClient

func (p *Pool) HealthClient(id string) (pluginsv1.PluginHealthClient, error)

HealthClient returns a PluginHealthClient for the given plugin ID.

func (*Pool) IDPClient

func (p *Pool) IDPClient(id string) (pluginsv1.IdentityPluginClient, error)

IDPClient returns an IdentityPluginClient for the given plugin ID.

func (*Pool) MiddlewareClient

func (p *Pool) MiddlewareClient(id string) (pluginsv1.PluginMiddlewareClient, error)

MiddlewareClient returns a PluginMiddlewareClient for the given plugin ID.

func (*Pool) UIClient

func (p *Pool) UIClient(id string) (pluginsv1.PluginUIClient, error)

UIClient returns a PluginUIClient for the given plugin ID.

Jump to

Keyboard shortcuts

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