Documentation
¶
Overview ¶
Package grpc manages live gRPC connections to plugin containers.
Index ¶
- type Pool
- func (p *Pool) Close(id string) error
- func (p *Pool) CloseAll()
- func (p *Pool) Dial(ctx context.Context, id, addr string) error
- func (p *Pool) HTTPPluginClient(id string) (pluginsv1.PluginHTTPClient, error)
- func (p *Pool) HasConnection(id string) bool
- func (p *Pool) HealthClient(id string) (pluginsv1.PluginHealthClient, error)
- func (p *Pool) IDPClient(id string) (pluginsv1.IdentityPluginClient, error)
- func (p *Pool) MiddlewareClient(id string) (pluginsv1.PluginMiddlewareClient, error)
- func (p *Pool) UIClient(id string) (pluginsv1.PluginUIClient, error)
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 (*Pool) Close ¶
Close closes and removes the connection for the given plugin ID. Returns nil if the connection does not exist.
func (*Pool) Dial ¶
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 ¶
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.