Documentation ¶
Index ¶
- Constants
- func Deinit(ctx context.Context, conn grpc.ClientConnInterface) error
- func Init(ctx context.Context, conn grpc.ClientConnInterface, hostServiceNames []string) (pluginServiceNames []string, err error)
- func Register(s *grpc.Server, servers []pluginsdk.ServiceServer, logger hclog.Logger, ...)
- type HostDialer
Constants ¶
const ( // HostServiceProviderID is the ID used with the HC plugin broker to dial // SPIRE for access to host services. It must be kept in sync between // both SPIRE and the SDK. HostServiceProviderID = 1 )
Variables ¶
This section is empty.
Functions ¶
func Deinit ¶
func Deinit(ctx context.Context, conn grpc.ClientConnInterface) error
Deinit deinitializes the plugin. It should only be called right before the host unloads the plugin and will not be invoking any other plugin or service RPCs.
func Init ¶
func Init(ctx context.Context, conn grpc.ClientConnInterface, hostServiceNames []string) (pluginServiceNames []string, err error)
Init initializes the plugin and advertises the given host service names to the plugin for brokering. The list of service names implemented by the plugin are returned. This function is only intended to be used internally and by SPIRE. See /private/README.md.
func Register ¶
func Register(s *grpc.Server, servers []pluginsdk.ServiceServer, logger hclog.Logger, dialer HostDialer)
Register registers the given servers with the gRPC server. The given and logger will be used when the plugins are initialized. This function is only intended to be used internally and by SPIRE. See /private/README.md.
Types ¶
type HostDialer ¶
type HostDialer interface {
DialHost(ctx context.Context) (grpc.ClientConnInterface, error)
}
HostDialer is a generic interface for dialing the host (i.e. SPIRE). This interface is only intended to be used internally and by SPIRE. See /private/README.md.