client

package
v0.0.0-...-4c2278c Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package client provides helpers for executing plugin binaries via RPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(ctx context.Context, path string, req proto.Message, resp proto.Message) error

Call executes the binary at path, sending the protobuf request and decoding the response. The response parameter must be a pointer to the expected message type.

func CallContext

func CallContext(ctx context.Context, path string, req proto.Message, resp proto.Message) error

CallContext reuses per-path plugin processes to satisfy request/response pairs.

Types

type Process

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

Process owns a spawned plugin binary and the pipes used for RPC communication.

func StartProcess

func StartProcess(ctx context.Context, path string) (*Process, error)

StartProcess launches the plugin binary at path and returns a Process wrapper.

func (*Process) Call

func (p *Process) Call(ctx context.Context, req proto.Message, resp proto.Message) error

Call performs a round-trip protobuf exchange with the running process.

func (*Process) Close

func (p *Process) Close() error

Close closes IO pipes and waits for the process to exit.

Jump to

Keyboard shortcuts

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