grpcplugin

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InfoMarkdown

func InfoMarkdown(pl sdk.GRPCPlugin) string

InfoMarkdown returns string formatted with markdown

func StartPlugin

func StartPlugin(ctx context.Context, pluginName string, workdir, cmd string, args []string, env []string) (io.Reader, string, error)

StartPlugin starts a plugin, returns stdoutPipe, stderrPipe and socketName

Types

type Common

type Common struct {
	Desc   *grpc.ServiceDesc
	Srv    interface{}
	Socket string
	// contains filtered or unexported fields
}

func (*Common) Instance

func (c *Common) Instance() *Common

func (*Common) Start

func (c *Common) Start(ctx context.Context) error

func (*Common) Stop

func (c *Common) Stop(context.Context, *empty.Empty) (*empty.Empty, error)

type Plugin

type Plugin interface {
	Start(context.Context) error
	Stop(context.Context, *empty.Empty) (*empty.Empty, error)
	Instance() *Common
}

Plugin is the interface to be implemented by plugin

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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