rpc

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rpc implmenets Python runtime

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractRuntime

type AbstractRuntime struct {
	runtime.AbstractRuntime
	// contains filtered or unexported fields
}

AbstractRuntime is a runtime that communicates via unix domain socket

func NewAbstractRuntime

func NewAbstractRuntime(logger logger.Logger,
	configuration *runtime.Configuration,
	runtimeInstance Runtime) (*AbstractRuntime, error)

NewAbstractRuntime returns a new RPC runtime

func (*AbstractRuntime) GetSocketType

func (r *AbstractRuntime) GetSocketType() connection.SocketType

GetSocketType returns the type of socket the runtime works with (unix/tcp)

func (*AbstractRuntime) ProcessBatch

func (r *AbstractRuntime) ProcessBatch(batch []nuclio.Event, functionLogger logger.Logger) ([]*runtime.ResponseWithErrors, error)

ProcessBatch processes a batch of events

func (*AbstractRuntime) ProcessEvent

func (r *AbstractRuntime) ProcessEvent(event nuclio.Event, functionLogger logger.Logger) (interface{}, error)

ProcessEvent processes an event

func (*AbstractRuntime) Restart

func (r *AbstractRuntime) Restart() error

Restart restarts the runtime

func (*AbstractRuntime) Signal

func (r *AbstractRuntime) Signal(signal syscall.Signal) error

func (*AbstractRuntime) Start

func (r *AbstractRuntime) Start() error

func (*AbstractRuntime) Stop

func (r *AbstractRuntime) Stop() error

Stop stops the runtime

func (*AbstractRuntime) SupportsControlCommunication

func (r *AbstractRuntime) SupportsControlCommunication() bool

SupportsControlCommunication returns true if the runtime supports control communication

func (*AbstractRuntime) SupportsRestart

func (r *AbstractRuntime) SupportsRestart() bool

SupportsRestart returns true if the runtime supports restart

func (*AbstractRuntime) WaitForProcessTermination

func (r *AbstractRuntime) WaitForProcessTermination(timeout time.Duration)

WaitForProcessTermination will best effort wait few seconds to stop channel, if timeout - assume closed

func (*AbstractRuntime) WaitForStart

func (r *AbstractRuntime) WaitForStart() bool

WaitForStart returns whether the runtime supports sending an indication that it started

type Runtime

type Runtime interface {

	// RunWrapper runs the wrapper
	RunWrapper([]string, string) (*os.Process, error)

	// GetSocketType returns the type of socket the runtime works with (unix/tcp)
	GetSocketType() connection.SocketType

	GetEventEncoder(writer io.Writer) encoder.EventEncoder

	// WaitForStart returns whether the runtime supports sending an indication that it started
	WaitForStart() bool

	// SupportsControlCommunication returns true if the runtime supports control communication
	SupportsControlCommunication() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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