pluginsdk

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NeedsHostServices

type NeedsHostServices interface {
	// BrokerHostServices is invoked by the plugin loader and provides a broker
	// that can be used by plugins/services to initialize clients to host
	// services provided by SPIRE. If an error is returned, plugin loading will
	// fail. This gives server implementations control over whether or not the
	// absence of a particular host service is a catastrophic failure.
	BrokerHostServices(ServiceBroker) error
}

NeedsHostServices is an interface implemented by plugin/service server implementations that need SPIRE host services.

type NeedsLogger

type NeedsLogger interface {
	SetLogger(logger hclog.Logger)
}

NeedsLogger is an interface implemented by server implementations that a logger. The provided logger is wired up to SPIRE and logs emitted with the logger will show up in SPIRE logs.

type PluginClient

type PluginClient interface {
	ServiceClient

	// Type returns the type of plugin (e.g. "KeyManager")
	Type() string
}

PluginClient is implemented by plugin client implementations.

type PluginServer

type PluginServer interface {
	ServiceServer

	// Type returns the type of plugin (e.g. "KeyManager")
	Type() string
}

PluginServer is implemented by plugin server implementations.

type ServiceBroker

type ServiceBroker interface {
	// BrokerClient initializes the passed in host service client. If the
	// host service is not available in SPIRE, the host service client will
	// remain uninitialized and the function will return false.
	BrokerClient(ServiceClient) bool
}

ServiceBroker is used to obtain clients to SPIRE host services.

type ServiceClient

type ServiceClient interface {
	// GRPCServiceName returns the full gRPC service name (e.g.
	// "spire.plugin.server.keymanager.v1.KeyManager")
	GRPCServiceName() string

	// InitClient initializes the client using the given gRPC client
	// connection. It returns the client implementation that was initialized.
	InitClient(conn grpc.ClientConnInterface) interface{}
}

ServiceClient is implemented by service/hostservice client implementations

type ServiceServer

type ServiceServer interface {
	// GRPCServiceName returns the full gRPC service name (e.g.
	// "spire.plugin.server.keymanager.v1.KeyManager")
	GRPCServiceName() string

	// RegisterServer registers the server implementation with the given gRPC server.
	// It returns the implementation that was registered.
	RegisterServer(server *grpc.Server) interface{}
}

ServiceServer is implemented by service/hostservice server implementations.

Jump to

Keyboard shortcuts

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