Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig = hcplugin.ClientConfig
type Config ¶
type Config struct {
TempDir string
GRPC *GRPCConfig
WASM *WASMConfig
}
type GRPCConfig ¶
type GRPCConfig struct {
HandshakeConfig HandshakeConfig
RunAsUser string
AllowedProtocols []Protocol
Stderr io.Writer
SyncStdout io.Writer
SyncStderr io.Writer
// Loader is used by the default gRPC preset.
// If nil, the preset returns *grpc.ClientConn as client.
Loader func(ctx context.Context, conn *grpc.ClientConn) (any, error)
ClientConfigOverride func(*ClientConfig)
}
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) PluginPath ¶
type HandshakeConfig ¶
type Protocol ¶
type Protocol string
const (
ProtocolGRPC Protocol = Protocol(hcplugin.ProtocolGRPC)
)
type WASMConfig ¶
type WASMConfig struct {
// Loader receives resolved module path from info.Command and returns:
// 1) plugin client instance used by caller
// 2) cleanup function invoked on Unload
Loader func(ctx context.Context, modulePath string, info Info) (client any, cleanup func(context.Context) error, err error)
// Reserved for future parity with design doc.
RuntimeConfigOverride any
}
Click to show internal directories.
Click to hide internal directories.