shared

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTypeGRPC = "grpc"
)

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "NAUTES_PIPELINE_PLUGIN",
	MagicCookieValue: "hereIsNautesPipeline",
}
View Source
var PluginMap = map[string]plugin.Plugin{
	PluginTypeGRPC: &HookFactoryPlugin{},
}

Functions

This section is empty.

Types

type GRPCClient

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

func (*GRPCClient) BuildHook

func (c *GRPCClient) BuildHook(hookName string, info component.HookBuildData) (*component.Hook, error)

func (*GRPCClient) GetHooksMetadata

func (c *GRPCClient) GetHooksMetadata() ([]resource.HookMetadata, error)

func (*GRPCClient) GetPipelineType

func (c *GRPCClient) GetPipelineType() (string, error)

type GRPCServer

type GRPCServer struct {
	Impl component.HookFactory
	*proto.UnimplementedHookFactoryServer
}

func (*GRPCServer) BuildHook

func (*GRPCServer) GetHooksMetaData

func (s *GRPCServer) GetHooksMetaData(_ context.Context, _ *proto.Empty) (*proto.GetHooksMetaDataResponse, error)

func (*GRPCServer) GetPipelineType

func (s *GRPCServer) GetPipelineType(_ context.Context, _ *proto.Empty) (*proto.GetPipelineTypeResponse, error)

type HookFactoryPlugin

type HookFactoryPlugin struct {
	plugin.Plugin
	Impl component.HookFactory
}

func (*HookFactoryPlugin) GRPCClient

func (hfp *HookFactoryPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*HookFactoryPlugin) GRPCServer

func (hfp *HookFactoryPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

Jump to

Keyboard shortcuts

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