proto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CQPlugin

type CQPlugin struct {
	// GRPCPlugin must still implement the Plugin interface
	plugin.Plugin
	// Concrete implementation, written in Go. This is only used for plugins
	// that are written in Go.
	Impl CQProvider
}

CQPlugin this is the implementation of plugin.GRPCPlugin so we can serve/consume this.

func (*CQPlugin) GRPCClient

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

func (*CQPlugin) GRPCServer

func (p *CQPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type CQProvider

type CQProvider interface {
	Init(driver string, dsn string, verbose bool) error
	Fetch(data []byte) error
	GenConfig() (string, error)
}

type GRPCClient

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

func (*GRPCClient) Fetch

func (m *GRPCClient) Fetch(data []byte) error

func (*GRPCClient) GenConfig

func (m *GRPCClient) GenConfig() (string, error)

func (*GRPCClient) Init

func (m *GRPCClient) Init(driver string, dsn string, verbose bool) error

type GRPCServer

type GRPCServer struct {
	// This is the real implementation
	Impl CQProvider
	internal.UnimplementedProviderServer
}

Here is the gRPC server that GRPCClient talks to.

func (*GRPCServer) Fetch

func (*GRPCServer) GenConfig

func (*GRPCServer) Init

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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