grpc

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	IPv4 = "IPv4"
	IPv6 = "IPv6"
)

Variables

This section is empty.

Functions

func BuildCallId added in v1.8.0

func BuildCallId() string

BuildCallId generates a unique id based on the current time this can be passed into plugin calls to assist with tracking parallel calls

func GetQualValue added in v0.2.9

func GetQualValue(v *proto.QualValue) interface{}

func HandleGrpcError added in v1.8.0

func HandleGrpcError(err error, connection, call string) error

func IsGRPCConnectivityError added in v1.8.0

func IsGRPCConnectivityError(err error) bool

func QualEquals added in v0.2.4

func QualEquals(left *proto.Qual, right *proto.Qual) bool

func QualMapToString

func QualMapToString(qualMap map[string]*proto.Quals) interface{}

func QualToString added in v0.2.4

func QualToString(q *proto.Qual) string

Types

type ExecuteFunc

type ExecuteFunc func(req *proto.ExecuteRequest, stream proto.WrapperPlugin_ExecuteServer) error

type GetSchemaFunc

type GetSchemaFunc func() (*PluginSchema, error)

type PluginClient

type PluginClient struct {
	Name string
	Stub pluginshared.WrapperPluginClient
	Pid  int
	// contains filtered or unexported fields
}

PluginClient is the client object used by clients of the plugin

func NewPluginClient added in v1.8.0

func NewPluginClient(reattach *plugin.ReattachConfig, pluginName string) (*PluginClient, error)

func (*PluginClient) Execute added in v1.8.0

func (*PluginClient) Exited added in v1.8.0

func (c *PluginClient) Exited() bool

Exited returned whether the underlying client has exited, i.e. th eplugin has terminated

func (*PluginClient) GetSchema added in v1.8.0

func (c *PluginClient) GetSchema() (*proto.Schema, error)

func (*PluginClient) GetSupportedOperations added in v1.8.0

func (c *PluginClient) GetSupportedOperations() (*proto.GetSupportedOperationsResponse, error)

func (*PluginClient) SetConnectionConfig added in v1.8.0

func (c *PluginClient) SetConnectionConfig(req *proto.SetConnectionConfigRequest) error

type PluginSchema added in v1.7.0

type PluginSchema struct {
	Schema map[string]*proto.TableSchema
	Mode   string
}

type PluginServer

type PluginServer struct {
	proto.UnimplementedWrapperPluginServer
	// contains filtered or unexported fields
}

PluginServer is the server for a single plugin

func NewPluginServer

func NewPluginServer(pluginName string, setConnectionConfigFunc SetConnectionConfigFunc, getSchemaFunc GetSchemaFunc, executeFunc ExecuteFunc) *PluginServer

func (PluginServer) Execute

func (PluginServer) GetSchema

func (s PluginServer) GetSchema(_ *proto.GetSchemaRequest) (res *proto.GetSchemaResponse, err error)

func (PluginServer) GetSupportedOperations added in v1.8.0

func (PluginServer) Serve

func (s PluginServer) Serve()

func (PluginServer) SetConnectionConfig added in v0.2.0

func (s PluginServer) SetConnectionConfig(req *proto.SetConnectionConfigRequest) (res *proto.SetConnectionConfigResponse, err error)

type SetConnectionConfigFunc added in v0.2.0

type SetConnectionConfigFunc func(string, string) error

Directories

Path Synopsis
Package shared contains shared data between the host and plugins.
Package shared contains shared data between the host and plugins.

Jump to

Keyboard shortcuts

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