Documentation
¶
Overview ¶
Package rpc implmenets Python runtime
Index ¶
- type AbstractRuntime
- func (r *AbstractRuntime) GetSocketType() connection.SocketType
- func (r *AbstractRuntime) ProcessBatch(batch []nuclio.Event, functionLogger logger.Logger) ([]*runtime.ResponseWithErrors, error)
- func (r *AbstractRuntime) ProcessEvent(event nuclio.Event, functionLogger logger.Logger) (interface{}, error)
- func (r *AbstractRuntime) Restart() error
- func (r *AbstractRuntime) Signal(signal syscall.Signal) error
- func (r *AbstractRuntime) Start() error
- func (r *AbstractRuntime) Stop() error
- func (r *AbstractRuntime) SupportsControlCommunication() bool
- func (r *AbstractRuntime) SupportsRestart() bool
- func (r *AbstractRuntime) WaitForProcessTermination(timeout time.Duration)
- func (r *AbstractRuntime) WaitForStart() bool
- type Runtime
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) Start ¶
func (r *AbstractRuntime) Start() error
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
}