rpc

package
v0.0.0-...-84339fa Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ManagerPluginIdentifier = "experiment_manager"
	RunnerPluginIdentifier  = "experiment_runner"
)

Variables

This section is empty.

Functions

func Connect

func Connect(pluginBinary string, logger *zap.Logger) (plugin.ClientProtocol, error)

Connect returns an instance of protocol client to be used to communicate with a plugin, served over net/rpc

func Serve

func Serve(services *ClientServices)

Serve serves provided ClientServices via net/rpc

Types

type ClientServices

type ClientServices struct {
	Manager manager.ConfigurableExperimentManager
	Runner  runner.ConfigurableExperimentRunner
}

type EngineFactory

type EngineFactory struct {
	sync.Mutex

	Client       plugin.ClientProtocol
	EngineConfig json.RawMessage
	// contains filtered or unexported fields
}

EngineFactory implements experiment.EngineFactory and creates experiment manager/runner backed by net/rpc plugin implementations

func NewFactory

func NewFactory(name string, cfg config.EngineConfig, logger *zap.SugaredLogger) (*EngineFactory, error)

func NewFactoryFromBinary

func NewFactoryFromBinary(
	pluginBinary string,
	engineCfg json.RawMessage,
	logger *zap.SugaredLogger,
) (*EngineFactory, error)

func (*EngineFactory) GetExperimentManager

func (f *EngineFactory) GetExperimentManager() (manager.ExperimentManager, error)

func (*EngineFactory) GetExperimentRunner

func (f *EngineFactory) GetExperimentRunner() (runner.ExperimentRunner, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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