grpc

package
v0.9.32 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const PluginName = "filter_grpc"

Variables

View Source
var (
	HandshakeConfig = hplugin.HandshakeConfig{
		ProtocolVersion:  1,
		MagicCookieKey:   "BASIC_PLUGIN",
		MagicCookieValue: "hello",
	}

	PluginMap = map[string]hplugin.Plugin{
		PluginName: &FilterGRPCPlugin{},
	}
)

Functions

This section is empty.

Types

type FilterGRPCPlugin

type FilterGRPCPlugin struct {
	hplugin.Plugin
	Impl core.IFilter
}

func (*FilterGRPCPlugin) GRPCClient

func (p *FilterGRPCPlugin) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*FilterGRPCPlugin) GRPCServer

func (p *FilterGRPCPlugin) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error

type GRPCClient

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

func (*GRPCClient) Close

func (m *GRPCClient) Close() error

func (*GRPCClient) Configure

func (m *GRPCClient) Configure(data map[string]interface{}) error

func (*GRPCClient) Filter

func (m *GRPCClient) Filter(msg *core.Msg) (bool, error)

type GRPCServer

type GRPCServer struct {
	Impl core.IFilter
}

func (*GRPCServer) Configure

func (*GRPCServer) Filter

Jump to

Keyboard shortcuts

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