bridge

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Bridge

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

func NewBridge

func NewBridge(invoker Invoker) *Bridge

func (*Bridge) RemoteSubtaskEntrypointHandler

func (b *Bridge) RemoteSubtaskEntrypointHandler(subtaskMeta models.SubtaskMeta) plugin.SubTaskEntryPoint

type CallResult

type CallResult struct {
	Results []byte
	Err     errors.Error
}

func NewCallResult

func NewCallResult(results []byte, err errors.Error) *CallResult

func (*CallResult) Get

func (m *CallResult) Get(target any) errors.Error

type CmdInvoker

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

func NewCmdInvoker

func NewCmdInvoker(execPath string) *CmdInvoker

func (*CmdInvoker) Call

func (c *CmdInvoker) Call(methodName string, ctx plugin.ExecContext, args ...any) *CallResult

func (*CmdInvoker) Stream

func (c *CmdInvoker) Stream(methodName string, ctx plugin.ExecContext, args ...any) *MethodStream

type Invoker

type Invoker interface {
	Call(methodName string, ctx plugin.ExecContext, args ...any) *CallResult
	Stream(methodName string, ctx plugin.ExecContext, args ...any) *MethodStream
}

type MethodStream

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

func (*MethodStream) Receive

func (m *MethodStream) Receive() <-chan *StreamResult

type RemoteContext

type RemoteContext interface {
	plugin.ExecContext
	GetSettings() map[string]any
}

func NewChildRemoteContext

func NewChildRemoteContext(ec plugin.ExecContext) RemoteContext

func NewRemoteContext

func NewRemoteContext(logger log.Logger, cfg *viper.Viper) RemoteContext

type RemoteProgress

type RemoteProgress struct {
	Current   int `json:"current"`
	Total     int `json:"total"`
	Increment int `json:"increment"`
}

type StreamResult

type StreamResult = CallResult

func NewStreamResult

func NewStreamResult(results []byte, err errors.Error) *StreamResult

Jump to

Keyboard shortcuts

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